/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = 'regional';
  @endpointMap = {
    cn-qingdao = 'baas.aliyuncs.com',
    cn-beijing = 'baas.aliyuncs.com',
    cn-zhangjiakou = 'baas.aliyuncs.com',
    cn-huhehaote = 'baas.aliyuncs.com',
    cn-shanghai = 'baas.aliyuncs.com',
    cn-shenzhen = 'baas.aliyuncs.com',
    cn-hongkong = 'baas.ap-southeast-1.aliyuncs.com',
    ap-southeast-2 = 'baas.ap-southeast-1.aliyuncs.com',
    ap-northeast-1 = 'baas.ap-southeast-1.aliyuncs.com',
    eu-west-1 = 'baas.ap-southeast-1.aliyuncs.com',
    us-west-1 = 'baas.ap-southeast-1.aliyuncs.com',
    us-east-1 = 'baas.ap-southeast-1.aliyuncs.com',
    eu-central-1 = 'baas.ap-southeast-1.aliyuncs.com',
    ap-south-1 = 'baas.ap-southeast-1.aliyuncs.com',
  };

  checkConfig(config);
  @endpoint = getEndpoint('baas', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model ChaincodePackage {
  chaincodePackageId?: string(name='ChaincodePackageId', example='cmcc-1.5:227c3cd472a8a2fcaa1c63f15812a1894348a985dc723006dd47d9f2848d10ed'),
  checksum?: string(name='Checksum', example='15bab12c29edbc095c33545b9867aec9be469c74a6dd5783df6ee74a24334c77'),
  deleteTime?: string(name='DeleteTime', example='1533025590'),
  deleted?: boolean(name='Deleted', example='false'),
  installTime?: string(name='InstallTime', example='1533025590'),
  label?: string(name='Label', example='label'),
  md5sum?: string(name='Md5sum', example='N02eVKuRJDA2ODtieMUxVw=='),
  message?: string(name='Message', example='ok'),
  organizationId?: string(name='OrganizationId', example='peers-aaaaaa2-1eqnj5o5w9dt3'),
  ossURL?: string(name='OssURL', example='hi003/7efbe860-1a40-42c9-9e6b-0bc08d7ee3a4/cmcc.tar.gz'),
  providerBid?: string(name='ProviderBid', example='26842'),
  providerUid?: string(name='ProviderUid', example='1313158505072210'),
  state?: string(name='State', example='Running'),
  type?: int32(name='Type', example='0'),
  typeName?: string(name='TypeName', example='golang'),
  uploadTime?: string(name='UploadTime', example='1533025590'),
}

model ChaincodeVO {
  chaincodeDefinitionId?: string(name='ChaincodeDefinitionId', example='a5f04baed775b016e8dc386783f40a2c8b13823cac22bc5fd11846cca4a13a9a'),
  chaincodeId?: string(name='ChaincodeId', example='code-sacc-jbkuldd3i7ad'),
  chaincodePackageId?: string(name='ChaincodePackageId', example='sacc_v1.0:698d4e73c5f1d0239fbf0313ac79ddfaf44d5a803ecb02a4d1983cca4a706860'),
  channelId?: string(name='ChannelId', example='chan-test-b0wx5suhgyb9p'),
  channelName?: string(name='ChannelName', example='f100'),
  consortiumId?: string(name='ConsortiumId', example='peers-aaaaaa2-1eqnj5o5w9dt3'),
  createTime?: string(name='CreateTime', example='1533025590'),
  deployTime?: string(name='DeployTime', example='1533025590'),
  endorsePolicy?: string(name='EndorsePolicy', example='OR ("perf9141MSP.member")'),
  initRequired?: boolean(name='InitRequired', example='false'),
  input?: string(name='Input', example='args:"key" args:"val"'),
  install?: boolean(name='Install', example='true'),
  management?: boolean(name='Management', example='false'),
  message?: string(name='Message', example='ok'),
  name?: string(name='Name', example='sacc'),
  path?: string(name='Path', example='chaincode/sacc'),
  providerId?: string(name='ProviderId', example='peers-aaaaaa2-1eqnj5o5w9dt3'),
  providerName?: string(name='ProviderName', example='perf9141'),
  state?: string(name='State', example='Pending'),
  type?: int32(name='Type', example='0'),
  version?: string(name='Version', example='1.1'),
}

model AcceptFabricInvitationRequest {
  code?: string(name='Code', description='This parameter is required.', example='secrettoken'),
  isAccepted?: boolean(name='IsAccepted', example='true'),
}

model AcceptFabricInvitationResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='52CC8D5B-79A8-4769-BC7B-8940556ADA49'),
  success?: boolean(name='Success', example='true'),
}

model AcceptFabricInvitationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AcceptFabricInvitationResponseBody(name='body'),
}

/**
 * @param request AcceptFabricInvitationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AcceptFabricInvitationResponse
 */
async function acceptFabricInvitationWithOptions(request: AcceptFabricInvitationRequest, runtime: Util.RuntimeOptions): AcceptFabricInvitationResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.code)) {
    body['Code'] = request.code;
  }
  if (!Util.isUnset(request.isAccepted)) {
    body['IsAccepted'] = request.isAccepted;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AcceptFabricInvitation',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request AcceptFabricInvitationRequest
 * @return AcceptFabricInvitationResponse
 */
async function acceptFabricInvitation(request: AcceptFabricInvitationRequest): AcceptFabricInvitationResponse {
  var runtime = new Util.RuntimeOptions{};
  return acceptFabricInvitationWithOptions(request, runtime);
}

model ApplyAntChainCertificateRequest {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='bDXK6boZ'),
  uploadReq?: string(name='UploadReq', description='This parameter is required.', example='LS0tLS1...'),
}

model ApplyAntChainCertificateResponseBody = {
  requestId?: string(name='RequestId', example='D3FB9E67-0E31-4B8B-8895-3660CCE8CA62'),
  result?: string(name='Result', example='success'),
}

model ApplyAntChainCertificateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ApplyAntChainCertificateResponseBody(name='body'),
}

/**
 * @param request ApplyAntChainCertificateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ApplyAntChainCertificateResponse
 */
async function applyAntChainCertificateWithOptions(request: ApplyAntChainCertificateRequest, runtime: Util.RuntimeOptions): ApplyAntChainCertificateResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.uploadReq)) {
    body['UploadReq'] = request.uploadReq;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ApplyAntChainCertificate',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ApplyAntChainCertificateRequest
 * @return ApplyAntChainCertificateResponse
 */
async function applyAntChainCertificate(request: ApplyAntChainCertificateRequest): ApplyAntChainCertificateResponse {
  var runtime = new Util.RuntimeOptions{};
  return applyAntChainCertificateWithOptions(request, runtime);
}

model ApplyAntChainCertificateWithKeyAutoCreationRequest {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='1q8B5R9p'),
  commonName?: string(name='CommonName', description='This parameter is required.', example='commonName'),
  consortiumId?: string(name='ConsortiumId', description='This parameter is required.', example='DV80nJXq'),
  countryName?: string(name='CountryName', description='This parameter is required.', example='countryName'),
  localityName?: string(name='LocalityName', description='This parameter is required.', example='localityName'),
  organizationName?: string(name='OrganizationName', description='This parameter is required.', example='organizationName'),
  organizationUnitName?: string(name='OrganizationUnitName', description='This parameter is required.', example='organizationUnitName'),
  password?: string(name='Password', description='This parameter is required.', example='password'),
  stateOrProvinceName?: string(name='StateOrProvinceName', description='This parameter is required.', example='stateOrProvinceName'),
}

model ApplyAntChainCertificateWithKeyAutoCreationResponseBody = {
  requestId?: string(name='RequestId', example='3E1894AF-FEE7-4C6C-8C2A-2B3EE0105B07'),
  result?: {
    downloadPath?: {
      caCrtUrl?: string(name='CaCrtUrl', example='http://***ca.crt'),
      clientCrtUrl?: string(name='ClientCrtUrl', example='http://***client.crt'),
      sdkUrl?: string(name='SdkUrl', example='http://***'),
      trustCaUrl?: string(name='TrustCaUrl', example='http://***trustCa'),
    }(name='DownloadPath'),
    privateKey?: string(name='PrivateKey', example='-----BEGIN ENCRYPTED PRIVATE KEY-----\\\\nMII***A=\\\\n-----END ENCRYPTED PRIVATE KEY-----\\\\n'),
  }(name='Result'),
}

model ApplyAntChainCertificateWithKeyAutoCreationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ApplyAntChainCertificateWithKeyAutoCreationResponseBody(name='body'),
}

/**
 * @param request ApplyAntChainCertificateWithKeyAutoCreationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ApplyAntChainCertificateWithKeyAutoCreationResponse
 */
async function applyAntChainCertificateWithKeyAutoCreationWithOptions(request: ApplyAntChainCertificateWithKeyAutoCreationRequest, runtime: Util.RuntimeOptions): ApplyAntChainCertificateWithKeyAutoCreationResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.commonName)) {
    body['CommonName'] = request.commonName;
  }
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  if (!Util.isUnset(request.countryName)) {
    body['CountryName'] = request.countryName;
  }
  if (!Util.isUnset(request.localityName)) {
    body['LocalityName'] = request.localityName;
  }
  if (!Util.isUnset(request.organizationName)) {
    body['OrganizationName'] = request.organizationName;
  }
  if (!Util.isUnset(request.organizationUnitName)) {
    body['OrganizationUnitName'] = request.organizationUnitName;
  }
  if (!Util.isUnset(request.password)) {
    body['Password'] = request.password;
  }
  if (!Util.isUnset(request.stateOrProvinceName)) {
    body['StateOrProvinceName'] = request.stateOrProvinceName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ApplyAntChainCertificateWithKeyAutoCreation',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ApplyAntChainCertificateWithKeyAutoCreationRequest
 * @return ApplyAntChainCertificateWithKeyAutoCreationResponse
 */
async function applyAntChainCertificateWithKeyAutoCreation(request: ApplyAntChainCertificateWithKeyAutoCreationRequest): ApplyAntChainCertificateWithKeyAutoCreationResponse {
  var runtime = new Util.RuntimeOptions{};
  return applyAntChainCertificateWithKeyAutoCreationWithOptions(request, runtime);
}

model ApproveFabricChaincodeDefinitionRequest {
  chaincodeId?: string(name='ChaincodeId', description='This parameter is required.', example='code-sacc-jbkuldd3i7ad'),
  chaincodePackageId?: string(name='ChaincodePackageId', example='sacc_v1.0:698d4e73c5f1d0239fbf0313ac79ddfaf44d5a803ecb02a4d1983cca4a706860'),
  location?: string(name='Location', example='cn-hangzhou'),
  organizationId?: string(name='OrganizationId', description='This parameter is required.', example='peers-aaaaaa2-1eqnj5o5w9dt3'),
}

model ApproveFabricChaincodeDefinitionResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: ChaincodeVO(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model ApproveFabricChaincodeDefinitionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ApproveFabricChaincodeDefinitionResponseBody(name='body'),
}

/**
 * @summary ApproveFabricChaincodeDefinition
 *
 * @param request ApproveFabricChaincodeDefinitionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ApproveFabricChaincodeDefinitionResponse
 */
async function approveFabricChaincodeDefinitionWithOptions(request: ApproveFabricChaincodeDefinitionRequest, runtime: Util.RuntimeOptions): ApproveFabricChaincodeDefinitionResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.chaincodeId)) {
    body['ChaincodeId'] = request.chaincodeId;
  }
  if (!Util.isUnset(request.chaincodePackageId)) {
    body['ChaincodePackageId'] = request.chaincodePackageId;
  }
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  if (!Util.isUnset(request.organizationId)) {
    body['OrganizationId'] = request.organizationId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ApproveFabricChaincodeDefinition',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary ApproveFabricChaincodeDefinition
 *
 * @param request ApproveFabricChaincodeDefinitionRequest
 * @return ApproveFabricChaincodeDefinitionResponse
 */
async function approveFabricChaincodeDefinition(request: ApproveFabricChaincodeDefinitionRequest): ApproveFabricChaincodeDefinitionResponse {
  var runtime = new Util.RuntimeOptions{};
  return approveFabricChaincodeDefinitionWithOptions(request, runtime);
}

model BatchAddAntChainMiniAppQRCodeAuthorizedUsersRequest {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='bDXK6boZ'),
  phoneList?: map[string]any(name='PhoneList', description='This parameter is required.', example='["1380013****", "1380013****"]'),
}

model BatchAddAntChainMiniAppQRCodeAuthorizedUsersShrinkRequest {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='bDXK6boZ'),
  phoneListShrink?: string(name='PhoneList', description='This parameter is required.', example='["1380013****", "1380013****"]'),
}

model BatchAddAntChainMiniAppQRCodeAuthorizedUsersResponseBody = {
  requestId?: string(name='RequestId', example='D68D66B6-1964-4073-8714-B49F5EF1AEFC'),
  result?: string(name='Result', example='success'),
}

model BatchAddAntChainMiniAppQRCodeAuthorizedUsersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchAddAntChainMiniAppQRCodeAuthorizedUsersResponseBody(name='body'),
}

/**
 * @param tmpReq BatchAddAntChainMiniAppQRCodeAuthorizedUsersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchAddAntChainMiniAppQRCodeAuthorizedUsersResponse
 */
async function batchAddAntChainMiniAppQRCodeAuthorizedUsersWithOptions(tmpReq: BatchAddAntChainMiniAppQRCodeAuthorizedUsersRequest, runtime: Util.RuntimeOptions): BatchAddAntChainMiniAppQRCodeAuthorizedUsersResponse {
  Util.validateModel(tmpReq);
  var request = new BatchAddAntChainMiniAppQRCodeAuthorizedUsersShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.phoneList)) {
    request.phoneListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.phoneList, 'PhoneList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.phoneListShrink)) {
    body['PhoneList'] = request.phoneListShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'BatchAddAntChainMiniAppQRCodeAuthorizedUsers',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request BatchAddAntChainMiniAppQRCodeAuthorizedUsersRequest
 * @return BatchAddAntChainMiniAppQRCodeAuthorizedUsersResponse
 */
async function batchAddAntChainMiniAppQRCodeAuthorizedUsers(request: BatchAddAntChainMiniAppQRCodeAuthorizedUsersRequest): BatchAddAntChainMiniAppQRCodeAuthorizedUsersResponse {
  var runtime = new Util.RuntimeOptions{};
  return batchAddAntChainMiniAppQRCodeAuthorizedUsersWithOptions(request, runtime);
}

model CheckFabricConsortiumDomainRequest {
  domainCode?: string(name='DomainCode', description='This parameter is required.', example='bank'),
}

model CheckFabricConsortiumDomainResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='8F80A214-89FC-4348-9B3F-15446B3DC1FA'),
  result?: {
    domain?: string(name='Domain', example='bank'),
    prompt?: string(name='Prompt', example='OK'),
    valid?: boolean(name='Valid', example='true'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model CheckFabricConsortiumDomainResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CheckFabricConsortiumDomainResponseBody(name='body'),
}

/**
 * @param request CheckFabricConsortiumDomainRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CheckFabricConsortiumDomainResponse
 */
async function checkFabricConsortiumDomainWithOptions(request: CheckFabricConsortiumDomainRequest, runtime: Util.RuntimeOptions): CheckFabricConsortiumDomainResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.domainCode)) {
    body['DomainCode'] = request.domainCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CheckFabricConsortiumDomain',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CheckFabricConsortiumDomainRequest
 * @return CheckFabricConsortiumDomainResponse
 */
async function checkFabricConsortiumDomain(request: CheckFabricConsortiumDomainRequest): CheckFabricConsortiumDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return checkFabricConsortiumDomainWithOptions(request, runtime);
}

model CheckFabricOrganizationDomainRequest {
  domain?: string(name='Domain', example='bank'),
  domainCode?: string(name='DomainCode', example='bank'),
}

model CheckFabricOrganizationDomainResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='C30A14C7-800E-468B-9EB2-C704DA49295E'),
  result?: {
    domain?: string(name='Domain', example='bank'),
    prompt?: string(name='Prompt', example='OK'),
    valid?: boolean(name='Valid', example='true'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model CheckFabricOrganizationDomainResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CheckFabricOrganizationDomainResponseBody(name='body'),
}

/**
 * @param request CheckFabricOrganizationDomainRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CheckFabricOrganizationDomainResponse
 */
async function checkFabricOrganizationDomainWithOptions(request: CheckFabricOrganizationDomainRequest, runtime: Util.RuntimeOptions): CheckFabricOrganizationDomainResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.domain)) {
    body['Domain'] = request.domain;
  }
  if (!Util.isUnset(request.domainCode)) {
    body['DomainCode'] = request.domainCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CheckFabricOrganizationDomain',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CheckFabricOrganizationDomainRequest
 * @return CheckFabricOrganizationDomainResponse
 */
async function checkFabricOrganizationDomain(request: CheckFabricOrganizationDomainRequest): CheckFabricOrganizationDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return checkFabricOrganizationDomainWithOptions(request, runtime);
}

model ConfirmFabricConsortiumMemberRequest {
  consortiumId?: string(name='ConsortiumId', description='This parameter is required.', example='consortium-aaaaaa-akpcsjjac2jd'),
  organization?: [ 
    {
      organizationId?: string(name='OrganizationId', description='This parameter is required.', example='peers-aaaaaa1-1oxw31d046jtl'),
    }
  ](name='Organization', description='This parameter is required.'),
}

model ConfirmFabricConsortiumMemberResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='50B3ACF3-CE12-433C-A834-9E8C657A4934'),
  result?: boolean(name='Result', example='true'),
  success?: boolean(name='Success', example='true'),
}

model ConfirmFabricConsortiumMemberResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ConfirmFabricConsortiumMemberResponseBody(name='body'),
}

/**
 * @param request ConfirmFabricConsortiumMemberRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ConfirmFabricConsortiumMemberResponse
 */
async function confirmFabricConsortiumMemberWithOptions(request: ConfirmFabricConsortiumMemberRequest, runtime: Util.RuntimeOptions): ConfirmFabricConsortiumMemberResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.consortiumId)) {
    query['ConsortiumId'] = request.consortiumId;
  }
  if (!Util.isUnset(request.organization)) {
    query['Organization'] = request.organization;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ConfirmFabricConsortiumMember',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ConfirmFabricConsortiumMemberRequest
 * @return ConfirmFabricConsortiumMemberResponse
 */
async function confirmFabricConsortiumMember(request: ConfirmFabricConsortiumMemberRequest): ConfirmFabricConsortiumMemberResponse {
  var runtime = new Util.RuntimeOptions{};
  return confirmFabricConsortiumMemberWithOptions(request, runtime);
}

model CopyAntChainContractProjectRequest {
  projectDescription?: string(name='ProjectDescription', example='copy project description'),
  projectId?: string(name='ProjectId', description='This parameter is required.', example='2L9VK68g'),
  projectName?: string(name='ProjectName', description='This parameter is required.', example='copyproject'),
  projectVersion?: string(name='ProjectVersion', description='This parameter is required.', example='v1.0.1'),
}

model CopyAntChainContractProjectResponseBody = {
  requestId?: string(name='RequestId', example='45D67F6F-C723-4AD8-8462-F94EE5FF22E6'),
  result?: {
    consortiumId?: string(name='ConsortiumId', example='DV80nJXq'),
    createTime?: long(name='CreateTime', example='1563953475248'),
    projectDescription?: string(name='ProjectDescription', example='copy project description'),
    projectId?: string(name='ProjectId', example='R6XMEdXe'),
    projectName?: string(name='ProjectName', example='copyproject'),
    projectVersion?: string(name='ProjectVersion', example='v1.0.1'),
    updateTime?: long(name='UpdateTime', example='1563953475248'),
  }(name='Result'),
}

model CopyAntChainContractProjectResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CopyAntChainContractProjectResponseBody(name='body'),
}

/**
 * @param request CopyAntChainContractProjectRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CopyAntChainContractProjectResponse
 */
async function copyAntChainContractProjectWithOptions(request: CopyAntChainContractProjectRequest, runtime: Util.RuntimeOptions): CopyAntChainContractProjectResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.projectDescription)) {
    body['ProjectDescription'] = request.projectDescription;
  }
  if (!Util.isUnset(request.projectId)) {
    body['ProjectId'] = request.projectId;
  }
  if (!Util.isUnset(request.projectName)) {
    body['ProjectName'] = request.projectName;
  }
  if (!Util.isUnset(request.projectVersion)) {
    body['ProjectVersion'] = request.projectVersion;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CopyAntChainContractProject',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CopyAntChainContractProjectRequest
 * @return CopyAntChainContractProjectResponse
 */
async function copyAntChainContractProject(request: CopyAntChainContractProjectRequest): CopyAntChainContractProjectResponse {
  var runtime = new Util.RuntimeOptions{};
  return copyAntChainContractProjectWithOptions(request, runtime);
}

model CreateAntChainAccountRequest {
  account?: string(name='Account', description='This parameter is required.', example='test'),
  accountPubKey?: string(name='AccountPubKey', description='This parameter is required.', example='AEDC32...'),
  accountRecoverPubKey?: string(name='AccountRecoverPubKey', description='This parameter is required.', example='AEDC32...'),
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='bDXK6boZ'),
}

model CreateAntChainAccountResponseBody = {
  requestId?: string(name='RequestId', example='0301F6CB-4FA6-4D03-8668-963623B63D0F'),
  result?: {
    account?: string(name='Account', example='test'),
    antChainId?: string(name='AntChainId', example='bDXK6boZ'),
  }(name='Result'),
}

model CreateAntChainAccountResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAntChainAccountResponseBody(name='body'),
}

/**
 * @param request CreateAntChainAccountRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAntChainAccountResponse
 */
async function createAntChainAccountWithOptions(request: CreateAntChainAccountRequest, runtime: Util.RuntimeOptions): CreateAntChainAccountResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.account)) {
    body['Account'] = request.account;
  }
  if (!Util.isUnset(request.accountPubKey)) {
    body['AccountPubKey'] = request.accountPubKey;
  }
  if (!Util.isUnset(request.accountRecoverPubKey)) {
    body['AccountRecoverPubKey'] = request.accountRecoverPubKey;
  }
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateAntChainAccount',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateAntChainAccountRequest
 * @return CreateAntChainAccountResponse
 */
async function createAntChainAccount(request: CreateAntChainAccountRequest): CreateAntChainAccountResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAntChainAccountWithOptions(request, runtime);
}

model CreateAntChainAccountWithKeyPairAutoCreationRequest {
  account?: string(name='Account', description='This parameter is required.', example='accountname'),
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='1q8B5R9p'),
  password?: string(name='Password', description='This parameter is required.', example='password'),
  recoverPassword?: string(name='RecoverPassword', description='This parameter is required.', example='************'),
}

model CreateAntChainAccountWithKeyPairAutoCreationResponseBody = {
  requestId?: string(name='RequestId', example='5F058BB4-3043-4638-86D4-EED84AD1AE54'),
  result?: {
    account?: string(name='Account', example='accountname'),
    accountPrivateKey?: string(name='AccountPrivateKey', example='-----BEGIN ENCRYPTED PRIVATE KEY-----\\\\nM***8=\\\\n-----END ENCRYPTED PRIVATE KEY-----\\\\n'),
    accountPublicKey?: string(name='AccountPublicKey', example='b***7'),
    accountRecoverPrivateKey?: string(name='AccountRecoverPrivateKey', example='-----BEGIN ENCRYPTED PRIVATE KEY-----\\\\nM***Io=\\\\n-----END ENCRYPTED PRIVATE KEY-----\\\\n'),
    accountRecoverPublicKey?: string(name='AccountRecoverPublicKey', example='d***b'),
    antChainId?: string(name='AntChainId', example='1q8B5R9p'),
  }(name='Result'),
}

model CreateAntChainAccountWithKeyPairAutoCreationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAntChainAccountWithKeyPairAutoCreationResponseBody(name='body'),
}

/**
 * @param request CreateAntChainAccountWithKeyPairAutoCreationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAntChainAccountWithKeyPairAutoCreationResponse
 */
async function createAntChainAccountWithKeyPairAutoCreationWithOptions(request: CreateAntChainAccountWithKeyPairAutoCreationRequest, runtime: Util.RuntimeOptions): CreateAntChainAccountWithKeyPairAutoCreationResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.account)) {
    body['Account'] = request.account;
  }
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.password)) {
    body['Password'] = request.password;
  }
  if (!Util.isUnset(request.recoverPassword)) {
    body['RecoverPassword'] = request.recoverPassword;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateAntChainAccountWithKeyPairAutoCreation',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateAntChainAccountWithKeyPairAutoCreationRequest
 * @return CreateAntChainAccountWithKeyPairAutoCreationResponse
 */
async function createAntChainAccountWithKeyPairAutoCreation(request: CreateAntChainAccountWithKeyPairAutoCreationRequest): CreateAntChainAccountWithKeyPairAutoCreationResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAntChainAccountWithKeyPairAutoCreationWithOptions(request, runtime);
}

model CreateAntChainConsortiumRequest {
  consortiumDescription?: string(name='ConsortiumDescription'),
  consortiumName?: string(name='ConsortiumName', description='This parameter is required.'),
}

model CreateAntChainConsortiumResponseBody = {
  requestId?: string(name='RequestId', example='87FAFC6B-E7AE-4626-B7F7-AE0B88E612D5'),
  result?: {
    consortiumId?: string(name='ConsortiumId', example='A28nO1ow'),
  }(name='Result'),
}

model CreateAntChainConsortiumResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAntChainConsortiumResponseBody(name='body'),
}

/**
 * @param request CreateAntChainConsortiumRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAntChainConsortiumResponse
 */
async function createAntChainConsortiumWithOptions(request: CreateAntChainConsortiumRequest, runtime: Util.RuntimeOptions): CreateAntChainConsortiumResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.consortiumDescription)) {
    body['ConsortiumDescription'] = request.consortiumDescription;
  }
  if (!Util.isUnset(request.consortiumName)) {
    body['ConsortiumName'] = request.consortiumName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateAntChainConsortium',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateAntChainConsortiumRequest
 * @return CreateAntChainConsortiumResponse
 */
async function createAntChainConsortium(request: CreateAntChainConsortiumRequest): CreateAntChainConsortiumResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAntChainConsortiumWithOptions(request, runtime);
}

model CreateAntChainContractContentRequest {
  content?: string(name='Content', example='""'),
  contentName?: string(name='ContentName', description='This parameter is required.', example='newFile'),
  isDirectory?: boolean(name='IsDirectory', description='This parameter is required.', example='false'),
  parentContentId?: string(name='ParentContentId', example='R38DYDop'),
  projectId?: string(name='ProjectId', description='This parameter is required.', example='bDXK1b8Z'),
}

model CreateAntChainContractContentResponseBody = {
  requestId?: string(name='RequestId', example='C407F102-062A-44B3-BBDC-E3B2718F633D'),
  result?: {
    content?: string(name='Content', example='""'),
    contentId?: string(name='ContentId', example='R6XMn59e'),
    contentName?: string(name='ContentName', example='newFile'),
    createTime?: string(name='CreateTime', example='1564024964404'),
    isDirectory?: boolean(name='IsDirectory', example='false'),
    parentContentId?: string(name='ParentContentId', example='R38DYDop'),
    projectId?: string(name='ProjectId', example='bDXK1b8Z'),
    updateTime?: string(name='UpdateTime', example='1564024964404'),
  }(name='Result'),
}

model CreateAntChainContractContentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAntChainContractContentResponseBody(name='body'),
}

/**
 * @param request CreateAntChainContractContentRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAntChainContractContentResponse
 */
async function createAntChainContractContentWithOptions(request: CreateAntChainContractContentRequest, runtime: Util.RuntimeOptions): CreateAntChainContractContentResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.content)) {
    body['Content'] = request.content;
  }
  if (!Util.isUnset(request.contentName)) {
    body['ContentName'] = request.contentName;
  }
  if (!Util.isUnset(request.isDirectory)) {
    body['IsDirectory'] = request.isDirectory;
  }
  if (!Util.isUnset(request.parentContentId)) {
    body['ParentContentId'] = request.parentContentId;
  }
  if (!Util.isUnset(request.projectId)) {
    body['ProjectId'] = request.projectId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateAntChainContractContent',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateAntChainContractContentRequest
 * @return CreateAntChainContractContentResponse
 */
async function createAntChainContractContent(request: CreateAntChainContractContentRequest): CreateAntChainContractContentResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAntChainContractContentWithOptions(request, runtime);
}

model CreateAntChainContractProjectRequest {
  consortiumId?: string(name='ConsortiumId', description='This parameter is required.', example='DV80nJXq'),
  projectDescription?: string(name='ProjectDescription', example='project description'),
  projectName?: string(name='ProjectName', description='This parameter is required.', example='projectname'),
  projectVersion?: string(name='ProjectVersion', description='This parameter is required.', example='v1.0.0'),
}

model CreateAntChainContractProjectResponseBody = {
  requestId?: string(name='RequestId', example='4261A4C3-B8B5-4555-AEBC-944C3EAB23DB'),
  result?: {
    consortiumId?: string(name='ConsortiumId', example='DV80nJXq'),
    createTime?: long(name='CreateTime', example='1563951889044'),
    projectDescription?: string(name='ProjectDescription', example='project description'),
    projectId?: string(name='ProjectId', example='R38DAbop'),
    projectName?: string(name='ProjectName', example='projectname'),
    projectVersion?: string(name='ProjectVersion', example='v1.0.0'),
    updateTime?: long(name='UpdateTime', example='1563951889140'),
  }(name='Result'),
}

model CreateAntChainContractProjectResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAntChainContractProjectResponseBody(name='body'),
}

/**
 * @param request CreateAntChainContractProjectRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAntChainContractProjectResponse
 */
async function createAntChainContractProjectWithOptions(request: CreateAntChainContractProjectRequest, runtime: Util.RuntimeOptions): CreateAntChainContractProjectResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  if (!Util.isUnset(request.projectDescription)) {
    body['ProjectDescription'] = request.projectDescription;
  }
  if (!Util.isUnset(request.projectName)) {
    body['ProjectName'] = request.projectName;
  }
  if (!Util.isUnset(request.projectVersion)) {
    body['ProjectVersion'] = request.projectVersion;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateAntChainContractProject',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateAntChainContractProjectRequest
 * @return CreateAntChainContractProjectResponse
 */
async function createAntChainContractProject(request: CreateAntChainContractProjectRequest): CreateAntChainContractProjectResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAntChainContractProjectWithOptions(request, runtime);
}

model CreateAntChainKmsAccountNewRequest {
  account?: string(name='Account', example='accountname'),
  antChainId?: string(name='AntChainId', example='8bd720bde18c4b37b0f4a1c7834db163'),
}

model CreateAntChainKmsAccountNewResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: string(name='HttpStatusCode', example='200'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='063C2175-C755-5C85-9C42-5EB432B67D9B'),
  result?: {
    myKmsKeyId?: string(name='MyKmsKeyId', example='1234565181228596659400e4-3bd7-4a83-b9af-d12654bb5779'),
    pubKey?: string(name='PubKey', example='d408f5c5c3c118b23646f4059c81fbe5a1b067a12f96f4a7a5e09eae10c81288cdf64aa887af89738b9ec5d16bc124594bf820a4afa24fe0de9d8dcfd1d99500'),
  }(name='Result'),
  resultCode?: string(name='ResultCode', example='OK'),
  resultMessage?: string(name='ResultMessage', example='OK'),
  success?: boolean(name='Success', example='true'),
}

model CreateAntChainKmsAccountNewResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAntChainKmsAccountNewResponseBody(name='body'),
}

/**
 * @summary 创建MyChain托管账户
 *
 * @param request CreateAntChainKmsAccountNewRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAntChainKmsAccountNewResponse
 */
async function createAntChainKmsAccountNewWithOptions(request: CreateAntChainKmsAccountNewRequest, runtime: Util.RuntimeOptions): CreateAntChainKmsAccountNewResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.account)) {
    body['Account'] = request.account;
  }
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateAntChainKmsAccountNew',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建MyChain托管账户
 *
 * @param request CreateAntChainKmsAccountNewRequest
 * @return CreateAntChainKmsAccountNewResponse
 */
async function createAntChainKmsAccountNew(request: CreateAntChainKmsAccountNewRequest): CreateAntChainKmsAccountNewResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAntChainKmsAccountNewWithOptions(request, runtime);
}

model CreateFabricChaincodeRequest {
  channelId?: string(name='ChannelId', description='This parameter is required.', example='chan-first-channel-1w55v3u39x2xz'),
  consortiumId?: string(name='ConsortiumId', description='This parameter is required.', example='consortium-aaaaaa-akpcsjjac2jd'),
  endorsePolicy?: string(name='EndorsePolicy', example='OR (\\\\"aaaaaa1MSP.peer\\\\")'),
  location?: string(name='Location', example='cn-hangzhou'),
  organizationId?: string(name='OrganizationId', description='This parameter is required.', example='peers-aaaaaa1-1oxw31d046jtl'),
  ossBucket?: string(name='OssBucket', description='This parameter is required.', example='https://chaincode.oss-cn-beijing.aliyuncs.com'),
  ossUrl?: string(name='OssUrl', description='This parameter is required.', example='aaaaaa1/a0cf8729-7d47-44c9-9ed5-6d2fdfc8dc2c/sacc.cc'),
}

model CreateFabricChaincodeResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='CD264CC8-B892-4CDC-BD31-7D179EE6E396'),
  result?: {
    chaincodeId?: string(name='ChaincodeId', example='code-sacc-1pr09q7jmo0np'),
    chaincodeName?: string(name='ChaincodeName', example='mychaincode'),
    chaincodeVersion?: string(name='ChaincodeVersion', example='1.0'),
    channelName?: string(name='ChannelName', example='first-channel'),
    consortiumId?: string(name='ConsortiumId', example='consortium-aaaaaa-akpcsjjac2jd'),
    createTime?: string(name='CreateTime', example='1544766801000'),
    deployTime?: string(name='DeployTime', example='1544766801000'),
    endorsePolicy?: string(name='EndorsePolicy', example='OR (\\\\"aaaaaa1MSP.peer\\\\")'),
    input?: string(name='Input', example='string'),
    install?: boolean(name='Install', example='true'),
    message?: string(name='Message', example='string'),
    path?: string(name='Path', example='go-sdk-demo/chaincode/src'),
    providerId?: string(name='ProviderId', example='peers-aaaaaa1-1oxw31d046jtl'),
    providerName?: string(name='ProviderName', example='peers-aaaaaa1-1oxw31d046jtl'),
    state?: string(name='State', example='Instantiatable'),
    type?: int32(name='Type', example='1'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model CreateFabricChaincodeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateFabricChaincodeResponseBody(name='body'),
}

/**
 * @param request CreateFabricChaincodeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateFabricChaincodeResponse
 */
async function createFabricChaincodeWithOptions(request: CreateFabricChaincodeRequest, runtime: Util.RuntimeOptions): CreateFabricChaincodeResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.channelId)) {
    body['ChannelId'] = request.channelId;
  }
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  if (!Util.isUnset(request.endorsePolicy)) {
    body['EndorsePolicy'] = request.endorsePolicy;
  }
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  if (!Util.isUnset(request.organizationId)) {
    body['OrganizationId'] = request.organizationId;
  }
  if (!Util.isUnset(request.ossBucket)) {
    body['OssBucket'] = request.ossBucket;
  }
  if (!Util.isUnset(request.ossUrl)) {
    body['OssUrl'] = request.ossUrl;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateFabricChaincode',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateFabricChaincodeRequest
 * @return CreateFabricChaincodeResponse
 */
async function createFabricChaincode(request: CreateFabricChaincodeRequest): CreateFabricChaincodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return createFabricChaincodeWithOptions(request, runtime);
}

model CreateFabricChaincodePackageRequest {
  location?: string(name='Location', example='cn-hangzhou'),
  organizationId?: string(name='OrganizationId', description='This parameter is required.', example='peers-aaaaaa2-1eqnj5o5w9dt3'),
  ossUrl?: string(name='OssUrl', description='This parameter is required.', example='hi003/7efbe860-1a40-42c9-9e6b-0bc08d7ee3a4/cmcc.tar.gz'),
}

model CreateFabricChaincodePackageResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  message?: string(name='Message', example='ok'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: ChaincodePackage(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model CreateFabricChaincodePackageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateFabricChaincodePackageResponseBody(name='body'),
}

/**
 * @summary CreateFabricChaincodePackage
 *
 * @param request CreateFabricChaincodePackageRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateFabricChaincodePackageResponse
 */
async function createFabricChaincodePackageWithOptions(request: CreateFabricChaincodePackageRequest, runtime: Util.RuntimeOptions): CreateFabricChaincodePackageResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  if (!Util.isUnset(request.organizationId)) {
    body['OrganizationId'] = request.organizationId;
  }
  if (!Util.isUnset(request.ossUrl)) {
    body['OssUrl'] = request.ossUrl;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateFabricChaincodePackage',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary CreateFabricChaincodePackage
 *
 * @param request CreateFabricChaincodePackageRequest
 * @return CreateFabricChaincodePackageResponse
 */
async function createFabricChaincodePackage(request: CreateFabricChaincodePackageRequest): CreateFabricChaincodePackageResponse {
  var runtime = new Util.RuntimeOptions{};
  return createFabricChaincodePackageWithOptions(request, runtime);
}

model CreateFabricChannelRequest {
  batchTimeout?: int32(name='BatchTimeout', example='2'),
  channelName?: string(name='ChannelName', description='This parameter is required.', example='channelx'),
  consortiumId?: string(name='ConsortiumId', description='This parameter is required.', example='consortium-aaaaaa-akpcsjjac2jd'),
  maxMessageCount?: int32(name='MaxMessageCount', example='50'),
  organization?: [ 
    {
      id?: string(name='Id', example='peers-aaaaaa1-1oxw31d046jtl'),
    }
  ](name='Organization', description='This parameter is required.'),
  preferredMaxBytes?: int32(name='PreferredMaxBytes', example='12'),
}

model CreateFabricChannelResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: {
    batchTimeout?: int32(name='BatchTimeout', example='2'),
    blockCount?: int32(name='BlockCount', example='2'),
    chaincodeCount?: int32(name='ChaincodeCount', example='2'),
    channelId?: string(name='ChannelId', example='chan-channelx-1l1hmckuuisxo'),
    channelName?: string(name='ChannelName', example='channelx'),
    consortiumId?: string(name='ConsortiumId', example='consortium-aaaaaa-akpcsjjac2jd'),
    consortiumName?: string(name='ConsortiumName', example='aaaaaa'),
    createTime?: string(name='CreateTime', example='1544768139624'),
    maxMessageCount?: int32(name='MaxMessageCount', example='50'),
    memberCount?: int32(name='MemberCount', example='1'),
    ownerBid?: string(name='OwnerBid', example='26842'),
    ownerName?: string(name='OwnerName', example='uid-'),
    ownerUid?: long(name='OwnerUid', example='1234'),
    preferredMaxBytes?: int32(name='PreferredMaxBytes', example='12'),
    requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
    state?: string(name='State', example='Running'),
    supportConfig?: boolean(name='SupportConfig', example='true'),
    updateTime?: string(name='UpdateTime', example='1544768139624'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model CreateFabricChannelResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateFabricChannelResponseBody(name='body'),
}

/**
 * @param request CreateFabricChannelRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateFabricChannelResponse
 */
async function createFabricChannelWithOptions(request: CreateFabricChannelRequest, runtime: Util.RuntimeOptions): CreateFabricChannelResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.channelName)) {
    query['ChannelName'] = request.channelName;
  }
  if (!Util.isUnset(request.consortiumId)) {
    query['ConsortiumId'] = request.consortiumId;
  }
  if (!Util.isUnset(request.organization)) {
    query['Organization'] = request.organization;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.batchTimeout)) {
    body['BatchTimeout'] = request.batchTimeout;
  }
  if (!Util.isUnset(request.maxMessageCount)) {
    body['MaxMessageCount'] = request.maxMessageCount;
  }
  if (!Util.isUnset(request.preferredMaxBytes)) {
    body['PreferredMaxBytes'] = request.preferredMaxBytes;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateFabricChannel',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateFabricChannelRequest
 * @return CreateFabricChannelResponse
 */
async function createFabricChannel(request: CreateFabricChannelRequest): CreateFabricChannelResponse {
  var runtime = new Util.RuntimeOptions{};
  return createFabricChannelWithOptions(request, runtime);
}

model CreateFabricChannelMemberRequest {
  channelId?: string(name='ChannelId', description='This parameter is required.', example='chan-channelx-1l1hmckuuisxo'),
  organization?: [ 
    {
      organizationId?: string(name='OrganizationId', description='This parameter is required.', example='peers-aaaaaa1-1oxw31d046jtl'),
    }
  ](name='Organization', description='This parameter is required.'),
}

model CreateFabricChannelMemberResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: boolean(name='Result', example='true'),
  success?: boolean(name='Success', example='true'),
}

model CreateFabricChannelMemberResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateFabricChannelMemberResponseBody(name='body'),
}

/**
 * @param request CreateFabricChannelMemberRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateFabricChannelMemberResponse
 */
async function createFabricChannelMemberWithOptions(request: CreateFabricChannelMemberRequest, runtime: Util.RuntimeOptions): CreateFabricChannelMemberResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!Util.isUnset(request.organization)) {
    query['Organization'] = request.organization;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateFabricChannelMember',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateFabricChannelMemberRequest
 * @return CreateFabricChannelMemberResponse
 */
async function createFabricChannelMember(request: CreateFabricChannelMemberRequest): CreateFabricChannelMemberResponse {
  var runtime = new Util.RuntimeOptions{};
  return createFabricChannelMemberWithOptions(request, runtime);
}

model CreateFabricConsortiumRequest {
  channelPolicy?: string(name='ChannelPolicy', description='This parameter is required.', example='all'),
  consortiumDescription?: string(name='ConsortiumDescription', example='some'),
  consortiumName?: string(name='ConsortiumName', description='This parameter is required.', example='aaaaa'),
  domain?: string(name='Domain', description='This parameter is required.', example='helloworld'),
  location?: string(name='Location', description='This parameter is required.', example='cn-hangzhou'),
  ordererType?: string(name='OrdererType', description='This parameter is required.', example='etcdraft'),
  orderersCount?: int32(name='OrderersCount', example='2'),
  organization?: [ 
    {
      organizationId?: string(name='OrganizationId', example='peers-yidio-1tuigx42b1goc'),
    }
  ](name='Organization'),
  paymentDuration?: int32(name='PaymentDuration', description='This parameter is required.', example='2'),
  paymentDurationUnit?: string(name='PaymentDurationUnit', description='This parameter is required.', example='month'),
  peersCount?: int32(name='PeersCount', example='2'),
  specName?: string(name='SpecName', description='This parameter is required.', example='basic'),
  zoneId?: string(name='ZoneId', example='random'),
}

model CreateFabricConsortiumResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: {
    channelCount?: int32(name='ChannelCount', example='0'),
    channelPolicy?: string(name='ChannelPolicy', example='Any'),
    clusterState?: string(name='ClusterState', example='Pending'),
    codeName?: string(name='CodeName', example='lianmenyumingyi'),
    consortiumId?: string(name='ConsortiumId', example='consortium-lianmenyumingyi-hc5d1bwlulg7'),
    consortiumName?: string(name='ConsortiumName', example='myconsortium'),
    createTime?: string(name='CreateTime', example='1544086901984'),
    description?: string(name='Description', example='string'),
    domain?: string(name='Domain', example='hello'),
    memberCount?: int32(name='MemberCount', example='2'),
    ordererCount?: int32(name='OrdererCount', example='1'),
    ordererType?: string(name='OrdererType', example='Kafka'),
    ownerBid?: string(name='OwnerBid', example='26842'),
    ownerUid?: long(name='OwnerUid', example='1019556'),
    regionId?: string(name='RegionId', example='cn-hangzhou'),
    serviceState?: string(name='ServiceState', example='Pending'),
    specName?: string(name='SpecName', example='basic'),
    zoneId?: string(name='ZoneId', example='cn-hangzhou'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model CreateFabricConsortiumResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateFabricConsortiumResponseBody(name='body'),
}

/**
 * @param request CreateFabricConsortiumRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateFabricConsortiumResponse
 */
async function createFabricConsortiumWithOptions(request: CreateFabricConsortiumRequest, runtime: Util.RuntimeOptions): CreateFabricConsortiumResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.channelPolicy)) {
    body['ChannelPolicy'] = request.channelPolicy;
  }
  if (!Util.isUnset(request.consortiumDescription)) {
    body['ConsortiumDescription'] = request.consortiumDescription;
  }
  if (!Util.isUnset(request.consortiumName)) {
    body['ConsortiumName'] = request.consortiumName;
  }
  if (!Util.isUnset(request.domain)) {
    body['Domain'] = request.domain;
  }
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  if (!Util.isUnset(request.ordererType)) {
    body['OrdererType'] = request.ordererType;
  }
  if (!Util.isUnset(request.orderersCount)) {
    body['OrderersCount'] = request.orderersCount;
  }
  if (!Util.isUnset(request.organization)) {
    body['Organization'] = request.organization;
  }
  if (!Util.isUnset(request.paymentDuration)) {
    body['PaymentDuration'] = request.paymentDuration;
  }
  if (!Util.isUnset(request.paymentDurationUnit)) {
    body['PaymentDurationUnit'] = request.paymentDurationUnit;
  }
  if (!Util.isUnset(request.peersCount)) {
    body['PeersCount'] = request.peersCount;
  }
  if (!Util.isUnset(request.specName)) {
    body['SpecName'] = request.specName;
  }
  if (!Util.isUnset(request.zoneId)) {
    body['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateFabricConsortium',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateFabricConsortiumRequest
 * @return CreateFabricConsortiumResponse
 */
async function createFabricConsortium(request: CreateFabricConsortiumRequest): CreateFabricConsortiumResponse {
  var runtime = new Util.RuntimeOptions{};
  return createFabricConsortiumWithOptions(request, runtime);
}

model CreateFabricConsortiumMemberRequest {
  code?: string(name='Code', description='This parameter is required.', example='200'),
  consortiumId?: string(name='ConsortiumId', description='This parameter is required.', example='consortium-aaaaaa-akpcsjjac2jd'),
  organization?: [ 
    {
      organizationId?: string(name='OrganizationId', example='peers-aaaaaa1-1oxw31d046jtl'),
    }
  ](name='Organization', description='This parameter is required.'),
}

model CreateFabricConsortiumMemberResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: boolean(name='Result', example='true'),
  success?: boolean(name='Success', example='true'),
}

model CreateFabricConsortiumMemberResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateFabricConsortiumMemberResponseBody(name='body'),
}

/**
 * @param request CreateFabricConsortiumMemberRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateFabricConsortiumMemberResponse
 */
async function createFabricConsortiumMemberWithOptions(request: CreateFabricConsortiumMemberRequest, runtime: Util.RuntimeOptions): CreateFabricConsortiumMemberResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.code)) {
    query['Code'] = request.code;
  }
  if (!Util.isUnset(request.consortiumId)) {
    query['ConsortiumId'] = request.consortiumId;
  }
  if (!Util.isUnset(request.organization)) {
    query['Organization'] = request.organization;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateFabricConsortiumMember',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateFabricConsortiumMemberRequest
 * @return CreateFabricConsortiumMemberResponse
 */
async function createFabricConsortiumMember(request: CreateFabricConsortiumMemberRequest): CreateFabricConsortiumMemberResponse {
  var runtime = new Util.RuntimeOptions{};
  return createFabricConsortiumMemberWithOptions(request, runtime);
}

model CreateFabricOrganizationRequest {
  description?: string(name='Description', example='description'),
  domain?: string(name='Domain', description='This parameter is required.', example='domain'),
  location?: string(name='Location', description='This parameter is required.', example='cn-hangzhou'),
  organizationName?: string(name='OrganizationName', description='This parameter is required.', example='name'),
  paymentDuration?: int32(name='PaymentDuration', description='This parameter is required.', example='12'),
  paymentDurationUnit?: string(name='PaymentDurationUnit', description='This parameter is required.', example='2'),
  peersCount?: int32(name='PeersCount', example='2'),
  specName?: string(name='SpecName', description='This parameter is required.', example='basic'),
}

model CreateFabricOrganizationResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: {
    clusterState?: string(name='ClusterState', example='Pending'),
    codeName?: string(name='CodeName', example='name'),
    consortiumCount?: int32(name='ConsortiumCount', example='2'),
    createTime?: string(name='CreateTime', example='1544086901984'),
    domain?: string(name='Domain', example='domain'),
    organizationDescription?: string(name='OrganizationDescription', example='desc'),
    organizationId?: string(name='OrganizationId', example='zuzhiyumingyi-hc5d1bwlulg7'),
    organizationName?: string(name='OrganizationName', example='zuzhiyumingyi'),
    ownerBid?: string(name='OwnerBid', example='26842'),
    ownerName?: string(name='OwnerName', example='name'),
    ownerUid?: long(name='OwnerUid', example='1019556'),
    peerCount?: int32(name='PeerCount', example='3'),
    regionId?: string(name='RegionId', example='cn-hangzhou'),
    requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
    serviceState?: string(name='ServiceState', example='Pending'),
    specName?: string(name='SpecName', example='baisc'),
    userCount?: int32(name='UserCount', example='2'),
    zoneId?: string(name='ZoneId', example='zone'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model CreateFabricOrganizationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateFabricOrganizationResponseBody(name='body'),
}

/**
 * @param request CreateFabricOrganizationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateFabricOrganizationResponse
 */
async function createFabricOrganizationWithOptions(request: CreateFabricOrganizationRequest, runtime: Util.RuntimeOptions): CreateFabricOrganizationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.domain)) {
    query['Domain'] = request.domain;
  }
  if (!Util.isUnset(request.location)) {
    query['Location'] = request.location;
  }
  if (!Util.isUnset(request.organizationName)) {
    query['OrganizationName'] = request.organizationName;
  }
  if (!Util.isUnset(request.specName)) {
    query['SpecName'] = request.specName;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.paymentDuration)) {
    body['PaymentDuration'] = request.paymentDuration;
  }
  if (!Util.isUnset(request.paymentDurationUnit)) {
    body['PaymentDurationUnit'] = request.paymentDurationUnit;
  }
  if (!Util.isUnset(request.peersCount)) {
    body['PeersCount'] = request.peersCount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateFabricOrganization',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateFabricOrganizationRequest
 * @return CreateFabricOrganizationResponse
 */
async function createFabricOrganization(request: CreateFabricOrganizationRequest): CreateFabricOrganizationResponse {
  var runtime = new Util.RuntimeOptions{};
  return createFabricOrganizationWithOptions(request, runtime);
}

model CreateFabricOrganizationUserRequest {
  attrs?: string(name='Attrs', example='foo=foo1,bar=bar1'),
  organizationId?: string(name='OrganizationId', description='This parameter is required.', example='peers-yidio-1tuigx42b****'),
  password?: string(name='Password', description='This parameter is required.', example='password'),
  username?: string(name='Username', description='This parameter is required.', example='username'),
}

model CreateFabricOrganizationUserResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: {
    createTime?: string(name='CreateTime', example='1544086901984'),
    expireTime?: string(name='ExpireTime', example='1544411108000'),
    fullname?: string(name='Fullname', example='fullname'),
    organizationId?: string(name='OrganizationId', example='peers-yidio-1tuigx42b****'),
    password?: string(name='Password', example='password'),
    username?: string(name='Username', example='username'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model CreateFabricOrganizationUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateFabricOrganizationUserResponseBody(name='body'),
}

/**
 * @param request CreateFabricOrganizationUserRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateFabricOrganizationUserResponse
 */
async function createFabricOrganizationUserWithOptions(request: CreateFabricOrganizationUserRequest, runtime: Util.RuntimeOptions): CreateFabricOrganizationUserResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.attrs)) {
    body['Attrs'] = request.attrs;
  }
  if (!Util.isUnset(request.organizationId)) {
    body['OrganizationId'] = request.organizationId;
  }
  if (!Util.isUnset(request.password)) {
    body['Password'] = request.password;
  }
  if (!Util.isUnset(request.username)) {
    body['Username'] = request.username;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateFabricOrganizationUser',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateFabricOrganizationUserRequest
 * @return CreateFabricOrganizationUserResponse
 */
async function createFabricOrganizationUser(request: CreateFabricOrganizationUserRequest): CreateFabricOrganizationUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return createFabricOrganizationUserWithOptions(request, runtime);
}

model DeleteAntChainConsortiumRequest {
  consortiumId?: string(name='ConsortiumId', description='This parameter is required.', example='q0oWq92P'),
}

model DeleteAntChainConsortiumResponseBody = {
  requestId?: string(name='RequestId', example='F3685787-9F2F-4D60-ADD6-07A5179552CA'),
  result?: string(name='Result', example='success'),
}

model DeleteAntChainConsortiumResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteAntChainConsortiumResponseBody(name='body'),
}

/**
 * @param request DeleteAntChainConsortiumRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAntChainConsortiumResponse
 */
async function deleteAntChainConsortiumWithOptions(request: DeleteAntChainConsortiumRequest, runtime: Util.RuntimeOptions): DeleteAntChainConsortiumResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAntChainConsortium',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DeleteAntChainConsortiumRequest
 * @return DeleteAntChainConsortiumResponse
 */
async function deleteAntChainConsortium(request: DeleteAntChainConsortiumRequest): DeleteAntChainConsortiumResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAntChainConsortiumWithOptions(request, runtime);
}

model DeleteAntChainContractContentRequest {
  contentId?: string(name='ContentId', description='This parameter is required.', example='GKX7KZX0'),
}

model DeleteAntChainContractContentResponseBody = {
  requestId?: string(name='RequestId', example='7E54F588-39DE-446F-9A16-B9BB0B05DF44'),
  result?: string(name='Result', example='success'),
}

model DeleteAntChainContractContentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteAntChainContractContentResponseBody(name='body'),
}

/**
 * @param request DeleteAntChainContractContentRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAntChainContractContentResponse
 */
async function deleteAntChainContractContentWithOptions(request: DeleteAntChainContractContentRequest, runtime: Util.RuntimeOptions): DeleteAntChainContractContentResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.contentId)) {
    body['ContentId'] = request.contentId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAntChainContractContent',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DeleteAntChainContractContentRequest
 * @return DeleteAntChainContractContentResponse
 */
async function deleteAntChainContractContent(request: DeleteAntChainContractContentRequest): DeleteAntChainContractContentResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAntChainContractContentWithOptions(request, runtime);
}

model DeleteAntChainContractProjectRequest {
  projectId?: string(name='ProjectId', description='This parameter is required.', example='AVXeKq8R'),
}

model DeleteAntChainContractProjectResponseBody = {
  requestId?: string(name='RequestId', example='4FAC5F05-FDF0-4599-9522-0120525F0145'),
  result?: string(name='Result', example='success'),
}

model DeleteAntChainContractProjectResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteAntChainContractProjectResponseBody(name='body'),
}

/**
 * @param request DeleteAntChainContractProjectRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAntChainContractProjectResponse
 */
async function deleteAntChainContractProjectWithOptions(request: DeleteAntChainContractProjectRequest, runtime: Util.RuntimeOptions): DeleteAntChainContractProjectResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.projectId)) {
    body['ProjectId'] = request.projectId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAntChainContractProject',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DeleteAntChainContractProjectRequest
 * @return DeleteAntChainContractProjectResponse
 */
async function deleteAntChainContractProject(request: DeleteAntChainContractProjectRequest): DeleteAntChainContractProjectResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAntChainContractProjectWithOptions(request, runtime);
}

model DeleteAntChainMiniAppQRCodeAuthorizedUserRequest {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='bDXK6boZ'),
  phone?: string(name='Phone', description='This parameter is required.', example='1380013****'),
}

model DeleteAntChainMiniAppQRCodeAuthorizedUserResponseBody = {
  requestId?: string(name='RequestId', example='D68D66B6-1964-4073-8714-B49F5EF1AEFC'),
  result?: string(name='Result', example='success'),
}

model DeleteAntChainMiniAppQRCodeAuthorizedUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteAntChainMiniAppQRCodeAuthorizedUserResponseBody(name='body'),
}

/**
 * @param request DeleteAntChainMiniAppQRCodeAuthorizedUserRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAntChainMiniAppQRCodeAuthorizedUserResponse
 */
async function deleteAntChainMiniAppQRCodeAuthorizedUserWithOptions(request: DeleteAntChainMiniAppQRCodeAuthorizedUserRequest, runtime: Util.RuntimeOptions): DeleteAntChainMiniAppQRCodeAuthorizedUserResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.phone)) {
    body['Phone'] = request.phone;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAntChainMiniAppQRCodeAuthorizedUser',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DeleteAntChainMiniAppQRCodeAuthorizedUserRequest
 * @return DeleteAntChainMiniAppQRCodeAuthorizedUserResponse
 */
async function deleteAntChainMiniAppQRCodeAuthorizedUser(request: DeleteAntChainMiniAppQRCodeAuthorizedUserRequest): DeleteAntChainMiniAppQRCodeAuthorizedUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAntChainMiniAppQRCodeAuthorizedUserWithOptions(request, runtime);
}

model DeleteFabricChaincodeRequest {
  chaincodeId?: string(name='ChaincodeId', description='This parameter is required.', example='code-sacc-1pr09q7jm****'),
}

model DeleteFabricChaincodeResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  success?: boolean(name='Success', example='true'),
}

model DeleteFabricChaincodeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteFabricChaincodeResponseBody(name='body'),
}

/**
 * @param request DeleteFabricChaincodeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteFabricChaincodeResponse
 */
async function deleteFabricChaincodeWithOptions(request: DeleteFabricChaincodeRequest, runtime: Util.RuntimeOptions): DeleteFabricChaincodeResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.chaincodeId)) {
    body['ChaincodeId'] = request.chaincodeId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteFabricChaincode',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DeleteFabricChaincodeRequest
 * @return DeleteFabricChaincodeResponse
 */
async function deleteFabricChaincode(request: DeleteFabricChaincodeRequest): DeleteFabricChaincodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteFabricChaincodeWithOptions(request, runtime);
}

model DescribeAntChainAccountsRequest {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='pYogqb9v'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
}

model DescribeAntChainAccountsResponseBody = {
  requestId?: string(name='RequestId', example='1692940F-87C5-468F-8188-6C95FC05BBA5'),
  result?: {
    accounts?: [ 
      {
        account?: string(name='Account'),
        accountPublicKey?: string(name='AccountPublicKey', example='de44334f1094cbd37e952ef691a837f36eab2e9afdf6bed9bf523c2dde40ff7b1ff526ec11b510d320f536685f75dd90f67fda8d41a69738a76a77c27b1373fb'),
        accountRecoveryKey?: string(name='AccountRecoveryKey', example='ee54a9c4511345f2de05889540eedb8dfed7b57ab0647c5894e4333596bc2ecef07a0469331d016ad9978b39367a0a5c217ef92ffffcbd6716db6667353891a9'),
        accountStatus?: string(name='AccountStatus', example='NORMAL'),
        antChainId?: string(name='AntChainId', example='pYogqb9v'),
      }
    ](name='Accounts'),
    pagination?: {
      pageNumber?: int32(name='PageNumber', example='1'),
      pageSize?: int32(name='PageSize', example='10'),
      totalCount?: int32(name='TotalCount', example='1'),
    }(name='Pagination'),
  }(name='Result'),
}

model DescribeAntChainAccountsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainAccountsResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainAccountsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainAccountsResponse
 */
async function describeAntChainAccountsWithOptions(request: DescribeAntChainAccountsRequest, runtime: Util.RuntimeOptions): DescribeAntChainAccountsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainAccounts',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainAccountsRequest
 * @return DescribeAntChainAccountsResponse
 */
async function describeAntChainAccounts(request: DescribeAntChainAccountsRequest): DescribeAntChainAccountsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainAccountsWithOptions(request, runtime);
}

model DescribeAntChainAccountsV2Request {
  antChainId?: string(name='AntChainId', description='This parameter is required.'),
  consortiumId?: string(name='ConsortiumId', example='M8GaMEyX'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
}

model DescribeAntChainAccountsV2ResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: string(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='D68D66B6-1964-4073-8714-B49F5EF1AEFC'),
  result?: {
    accounts?: [ 
      {
        account?: string(name='Account', example='test'),
        accountPublicKey?: string(name='AccountPublicKey', example='2aa43bae103b6840ce8efdfe6f3fe5e52f8d1db0f44ff762df87ba17eb209979a0e22c934b2728c6c1bab864a6da52de60c5da89793bd839650a1a153e876e32'),
        accountRecoveryKey?: string(name='AccountRecoveryKey', example='5a36312d78681794258bb33372586c676adf150ad69e67dbfcaae61bba3607705950bc9efe1bf4a17ac24b05b1615a410e48d2a005dca251c6173495bb47ae29'),
        accountStatus?: string(name='AccountStatus', example='NORMAL'),
        antChainId?: string(name='AntChainId', example='8bd720bde18c4b37b0f4a1c7834db163'),
      }
    ](name='Accounts'),
    pagination?: {
      pageNumber?: int32(name='PageNumber', example='1'),
      pageSize?: int32(name='PageSize', example='10'),
      totalCount?: int32(name='TotalCount', example='100'),
    }(name='Pagination'),
  }(name='Result'),
  resultCode?: string(name='ResultCode', example='OK'),
  resultMessage?: string(name='ResultMessage', example='OK'),
  success?: boolean(name='Success', example='true'),
}

model DescribeAntChainAccountsV2Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainAccountsV2ResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainAccountsV2Request
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainAccountsV2Response
 */
async function describeAntChainAccountsV2WithOptions(request: DescribeAntChainAccountsV2Request, runtime: Util.RuntimeOptions): DescribeAntChainAccountsV2Response {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainAccountsV2',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainAccountsV2Request
 * @return DescribeAntChainAccountsV2Response
 */
async function describeAntChainAccountsV2(request: DescribeAntChainAccountsV2Request): DescribeAntChainAccountsV2Response {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainAccountsV2WithOptions(request, runtime);
}

model DescribeAntChainBlockRequest {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='pYogqb9v'),
  height?: long(name='Height', description='This parameter is required.', example='1234'),
}

model DescribeAntChainBlockResponseBody = {
  requestId?: string(name='RequestId', example='4DDA2E72-778A-4D79-BE70-448A26A57227'),
  result?: {
    antChainId?: string(name='AntChainId', example='pYogqb9v'),
    blockHash?: string(name='BlockHash', example='aeec5963f8deeeae820aaf302f0c925db9fa8d07b9898dac782335f817554e47'),
    createTime?: long(name='CreateTime', example='1562851727742'),
    height?: int32(name='Height', example='1234'),
    previousHash?: string(name='PreviousHash', example='e11767c7b9d92563663a76f10c69e8354788001e2c9e6bd9267239a81d3bb523'),
    rootTxHash?: string(name='RootTxHash', example='0000000000000000000000000000000000000000000000000000000000000000'),
    transSummaryList?: string(name='TransSummaryList', example='[]'),
    transactionSize?: int32(name='TransactionSize', example='0'),
    version?: long(name='Version', example='2'),
  }(name='Result'),
}

model DescribeAntChainBlockResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainBlockResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainBlockRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainBlockResponse
 */
async function describeAntChainBlockWithOptions(request: DescribeAntChainBlockRequest, runtime: Util.RuntimeOptions): DescribeAntChainBlockResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.height)) {
    body['Height'] = request.height;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainBlock',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainBlockRequest
 * @return DescribeAntChainBlockResponse
 */
async function describeAntChainBlock(request: DescribeAntChainBlockRequest): DescribeAntChainBlockResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainBlockWithOptions(request, runtime);
}

model DescribeAntChainBlockV2Request {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='8bd720bde18c4b37b0f4a1c7834db163'),
  consortiumId?: string(name='ConsortiumId', example='M8GaMEyX'),
  height?: long(name='Height', description='This parameter is required.', example='100'),
}

model DescribeAntChainBlockV2ResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: string(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='D68D66B6-1964-4073-8714-B49F5EF1AEFC'),
  result?: {
    antChainId?: string(name='AntChainId', example='8bd720bde18c4b37b0f4a1c7834db163'),
    blockHash?: string(name='BlockHash', example='5abf96debc87f1b64dcbaf4fa57fd46f2a06acdb5de0ba91ef9718d81aebafc7'),
    createTime?: long(name='CreateTime', example='1609223363570'),
    height?: int32(name='Height', example='254761'),
    previousHash?: string(name='PreviousHash', example='2444ef0617e0c6845549dead70f118c5a58f03c04575ecb79e283ab5c34b491d'),
    rootTxHash?: string(name='RootTxHash', example='0000000000000000000000000000000000000000000000000000000000000000'),
    transSummaryList?: [ 
      {
        alias?: string(name='Alias', example='8bd720bde18c4b37b0f4a1c7834db163'),
        blockHash?: string(name='BlockHash', example='5abf96debc87f1b64dcbaf4fa57fd46f2a06acdb5de0ba91ef9718d81aebafc7'),
        category?: int32(name='Category', example='0'),
        createTime?: long(name='CreateTime', example='1609223363570'),
        from?: string(name='From', example='e7d3e769f3f593dadcb8634cc5b09fc90dd3a61c4a06a79cb0923662fe6fae6b'),
        gasUsed?: long(name='GasUsed', example='4000000'),
        hash?: string(name='Hash', example='076bba1b726b3bcb958cba6fffc03eaa5cbed59320271dcbc0e05648a18a94f2'),
        height?: long(name='Height', example='254761'),
        referenceCount?: int32(name='ReferenceCount', example='0'),
        to?: string(name='To', example='e93372533f323b2f12783aa3a586135cf421486439c2cdcde47411b78f9839ec'),
        transTypeV10?: string(name='TransTypeV10', example='CALL_CONTRACT'),
        transTypeV6?: string(name='TransTypeV6', example='""'),
      }
    ](name='TransSummaryList'),
    transactionSize?: int32(name='TransactionSize', example='1'),
    version?: long(name='Version', example='1'),
  }(name='Result'),
  resultCode?: string(name='ResultCode', example='OK'),
  resultMessage?: string(name='ResultMessage', example='OK'),
  success?: boolean(name='Success', example='true'),
}

model DescribeAntChainBlockV2Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainBlockV2ResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainBlockV2Request
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainBlockV2Response
 */
async function describeAntChainBlockV2WithOptions(request: DescribeAntChainBlockV2Request, runtime: Util.RuntimeOptions): DescribeAntChainBlockV2Response {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  if (!Util.isUnset(request.height)) {
    body['Height'] = request.height;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainBlockV2',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainBlockV2Request
 * @return DescribeAntChainBlockV2Response
 */
async function describeAntChainBlockV2(request: DescribeAntChainBlockV2Request): DescribeAntChainBlockV2Response {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainBlockV2WithOptions(request, runtime);
}

model DescribeAntChainCertificateApplicationsRequest {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='1q8B5R9p'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
  status?: string(name='Status', description='This parameter is required.', example='1'),
}

model DescribeAntChainCertificateApplicationsResponseBody = {
  requestId?: string(name='RequestId', example='B232A84E-7944-4EB0-83D0-9D409E12E0A8'),
  result?: {
    certificateApplications?: [ 
      {
        antChainId?: string(name='AntChainId', example='1q8B5R9p'),
        bid?: string(name='Bid', description='Bid', example='26842'),
        createtime?: long(name='Createtime', example='1563949275000'),
        status?: string(name='Status', example='1'),
        updatetime?: long(name='Updatetime', example='1563949275000'),
        username?: string(name='Username', example='uid-128712635330****'),
      }
    ](name='CertificateApplications'),
    pagination?: {
      pageNumber?: int32(name='PageNumber', example='1'),
      pageSize?: int32(name='PageSize', example='20'),
      totalCount?: int32(name='TotalCount', example='1'),
    }(name='Pagination'),
  }(name='Result'),
}

model DescribeAntChainCertificateApplicationsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainCertificateApplicationsResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainCertificateApplicationsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainCertificateApplicationsResponse
 */
async function describeAntChainCertificateApplicationsWithOptions(request: DescribeAntChainCertificateApplicationsRequest, runtime: Util.RuntimeOptions): DescribeAntChainCertificateApplicationsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.status)) {
    body['Status'] = request.status;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainCertificateApplications',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainCertificateApplicationsRequest
 * @return DescribeAntChainCertificateApplicationsResponse
 */
async function describeAntChainCertificateApplications(request: DescribeAntChainCertificateApplicationsRequest): DescribeAntChainCertificateApplicationsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainCertificateApplicationsWithOptions(request, runtime);
}

model DescribeAntChainCertificateApplicationsV2Request {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='8bd720bde18c4b37b0f4a1c7834db163'),
  consortiumId?: string(name='ConsortiumId', example='M8GaMEyX'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='10'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='1'),
  status?: string(name='Status', description='This parameter is required.', example='1'),
}

model DescribeAntChainCertificateApplicationsV2ResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: string(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='D68D66B6-1964-4073-8714-B49F5EF1AEFC'),
  result?: {
    certificateApplications?: [ 
      {
        antChainId?: string(name='AntChainId', example='8bd720bde18c4b37b0f4a1c7834db163'),
        bid?: string(name='Bid', example='26842'),
        createtime?: long(name='Createtime', example='1609848404000'),
        status?: string(name='Status', example='1'),
        updatetime?: long(name='Updatetime', example='1609848404000'),
        username?: string(name='Username', example='uid-103477475017****'),
      }
    ](name='CertificateApplications'),
    pagination?: {
      pageNumber?: int32(name='PageNumber', example='1'),
      pageSize?: int32(name='PageSize', example='10'),
      totalCount?: int32(name='TotalCount', example='100'),
    }(name='Pagination'),
  }(name='Result'),
  resultCode?: string(name='ResultCode', example='OK'),
  resultMessage?: string(name='ResultMessage', example='OK'),
  success?: boolean(name='Success', example='true'),
}

model DescribeAntChainCertificateApplicationsV2Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainCertificateApplicationsV2ResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainCertificateApplicationsV2Request
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainCertificateApplicationsV2Response
 */
async function describeAntChainCertificateApplicationsV2WithOptions(request: DescribeAntChainCertificateApplicationsV2Request, runtime: Util.RuntimeOptions): DescribeAntChainCertificateApplicationsV2Response {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.status)) {
    body['Status'] = request.status;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainCertificateApplicationsV2',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainCertificateApplicationsV2Request
 * @return DescribeAntChainCertificateApplicationsV2Response
 */
async function describeAntChainCertificateApplicationsV2(request: DescribeAntChainCertificateApplicationsV2Request): DescribeAntChainCertificateApplicationsV2Response {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainCertificateApplicationsV2WithOptions(request, runtime);
}

model DescribeAntChainConsortiumsRequest {
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
}

model DescribeAntChainConsortiumsResponseBody = {
  requestId?: string(name='RequestId', example='D68D66B6-1964-4073-8714-B49F5EF1AEFC'),
  result?: {
    antConsortiums?: [ 
      {
        chainNum?: long(name='ChainNum', example='1'),
        consortiumDescription?: string(name='ConsortiumDescription'),
        consortiumId?: string(name='ConsortiumId', example='DV80nJXq'),
        consortiumName?: string(name='ConsortiumName'),
        createTime?: long(name='CreateTime', example='1562845453000'),
        memberNum?: long(name='MemberNum', example='2'),
        role?: string(name='Role', example='SuperAdmin'),
        status?: string(name='Status', example='Active'),
      }
    ](name='AntConsortiums'),
    pagination?: {
      pageNumber?: int32(name='PageNumber', example='1'),
      pageSize?: int32(name='PageSize', example='10'),
      totalCount?: int32(name='TotalCount', example='1'),
    }(name='Pagination'),
  }(name='Result'),
}

model DescribeAntChainConsortiumsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainConsortiumsResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainConsortiumsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainConsortiumsResponse
 */
async function describeAntChainConsortiumsWithOptions(request: DescribeAntChainConsortiumsRequest, runtime: Util.RuntimeOptions): DescribeAntChainConsortiumsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainConsortiums',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainConsortiumsRequest
 * @return DescribeAntChainConsortiumsResponse
 */
async function describeAntChainConsortiums(request: DescribeAntChainConsortiumsRequest): DescribeAntChainConsortiumsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainConsortiumsWithOptions(request, runtime);
}

model DescribeAntChainConsortiumsV2Request {
  pageNumber?: int32(name='PageNumber', example='10'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='1'),
}

model DescribeAntChainConsortiumsV2ResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: string(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='D68D66B6-1964-4073-8714-B49F5EF1AEFC'),
  result?: {
    antConsortiums?: [ 
      {
        chainNum?: long(name='ChainNum', example='2'),
        consortiumDescription?: string(name='ConsortiumDescription', example='test'),
        consortiumId?: string(name='ConsortiumId', example='M8GaMEyX'),
        consortiumName?: string(name='ConsortiumName'),
        createTime?: long(name='CreateTime', example='1609745002000'),
        isEmptyConsortium?: boolean(name='IsEmptyConsortium', example='false'),
        memberNum?: long(name='MemberNum', example='2'),
        role?: string(name='Role', example='Member'),
        status?: string(name='Status', example='Active'),
      }
    ](name='AntConsortiums'),
    pagination?: {
      pageNumber?: int32(name='PageNumber', example='1'),
      pageSize?: int32(name='PageSize', example='10'),
      totalCount?: int32(name='TotalCount', example='10'),
    }(name='Pagination'),
  }(name='Result'),
  resultCode?: string(name='ResultCode', example='OK'),
  resultMessage?: string(name='ResultMessage', example='OK'),
  success?: boolean(name='Success', example='true'),
}

model DescribeAntChainConsortiumsV2Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainConsortiumsV2ResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainConsortiumsV2Request
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainConsortiumsV2Response
 */
async function describeAntChainConsortiumsV2WithOptions(request: DescribeAntChainConsortiumsV2Request, runtime: Util.RuntimeOptions): DescribeAntChainConsortiumsV2Response {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainConsortiumsV2',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainConsortiumsV2Request
 * @return DescribeAntChainConsortiumsV2Response
 */
async function describeAntChainConsortiumsV2(request: DescribeAntChainConsortiumsV2Request): DescribeAntChainConsortiumsV2Response {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainConsortiumsV2WithOptions(request, runtime);
}

model DescribeAntChainContractProjectContentTreeRequest {
  projectId?: string(name='ProjectId', description='This parameter is required.', example='2L9VK68g'),
}

model DescribeAntChainContractProjectContentTreeResponseBody = {
  requestId?: string(name='RequestId', example='A0DF307A-A44A-476F-99D8-BA4F205350BD'),
  result?: {
    children?: [  map[string]any ](name='Children'),
    projectDescription?: string(name='ProjectDescription', example='description'),
    projectId?: string(name='ProjectId', example='2L9VK68g'),
    projectName?: string(name='ProjectName', example='projectname'),
    projectVersion?: string(name='ProjectVersion', example='5'),
  }(name='Result'),
}

model DescribeAntChainContractProjectContentTreeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainContractProjectContentTreeResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainContractProjectContentTreeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainContractProjectContentTreeResponse
 */
async function describeAntChainContractProjectContentTreeWithOptions(request: DescribeAntChainContractProjectContentTreeRequest, runtime: Util.RuntimeOptions): DescribeAntChainContractProjectContentTreeResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.projectId)) {
    body['ProjectId'] = request.projectId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainContractProjectContentTree',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainContractProjectContentTreeRequest
 * @return DescribeAntChainContractProjectContentTreeResponse
 */
async function describeAntChainContractProjectContentTree(request: DescribeAntChainContractProjectContentTreeRequest): DescribeAntChainContractProjectContentTreeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainContractProjectContentTreeWithOptions(request, runtime);
}

model DescribeAntChainContractProjectContentTreeV2Request {
  consortiumId?: string(name='ConsortiumId', description='This parameter is required.', example='M8GaMEyX'),
  projectId?: string(name='ProjectId', description='This parameter is required.', example='2L9VK68g'),
}

model DescribeAntChainContractProjectContentTreeV2ResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: string(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='D68D66B6-1964-4073-8714-B49F5EF1AEFC'),
  result?: string(name='Result', example='"{"description":"","projectId":"","projectName":"","treeContractContent":[{"content":"","fileName":"","id":"","isDir":false,"parentId\\\\":""}],"type":"","version":""}"'),
  resultCode?: string(name='ResultCode', example='OK'),
  resultMessage?: string(name='ResultMessage', example='OK'),
  success?: boolean(name='Success', example='true'),
}

model DescribeAntChainContractProjectContentTreeV2Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainContractProjectContentTreeV2ResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainContractProjectContentTreeV2Request
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainContractProjectContentTreeV2Response
 */
async function describeAntChainContractProjectContentTreeV2WithOptions(request: DescribeAntChainContractProjectContentTreeV2Request, runtime: Util.RuntimeOptions): DescribeAntChainContractProjectContentTreeV2Response {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  if (!Util.isUnset(request.projectId)) {
    body['ProjectId'] = request.projectId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainContractProjectContentTreeV2',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainContractProjectContentTreeV2Request
 * @return DescribeAntChainContractProjectContentTreeV2Response
 */
async function describeAntChainContractProjectContentTreeV2(request: DescribeAntChainContractProjectContentTreeV2Request): DescribeAntChainContractProjectContentTreeV2Response {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainContractProjectContentTreeV2WithOptions(request, runtime);
}

model DescribeAntChainContractProjectsRequest {
  consortiumId?: string(name='ConsortiumId', description='This parameter is required.', example='DV80nJXq'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
}

model DescribeAntChainContractProjectsResponseBody = {
  requestId?: string(name='RequestId', example='5EDAC16F-EA3E-4017-B223-D76220F985DF'),
  result?: {
    contractProjects?: [ 
      {
        consortiumId?: string(name='ConsortiumId', example='DV80nJXq'),
        createTime?: long(name='CreateTime', example='1562847564000'),
        projectDescription?: string(name='ProjectDescription', example='description'),
        projectId?: string(name='ProjectId', example='2L9VK68g'),
        projectName?: string(name='ProjectName', example='projectname'),
        projectVersion?: string(name='ProjectVersion', example='5'),
        updateTime?: long(name='UpdateTime', example='1563954499000'),
      }
    ](name='ContractProjects'),
    pagination?: {
      pageNumber?: int32(name='PageNumber', example='1'),
      pageSize?: int32(name='PageSize', example='10'),
      totalCount?: int32(name='TotalCount', example='1'),
    }(name='Pagination'),
  }(name='Result'),
}

model DescribeAntChainContractProjectsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainContractProjectsResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainContractProjectsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainContractProjectsResponse
 */
async function describeAntChainContractProjectsWithOptions(request: DescribeAntChainContractProjectsRequest, runtime: Util.RuntimeOptions): DescribeAntChainContractProjectsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainContractProjects',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainContractProjectsRequest
 * @return DescribeAntChainContractProjectsResponse
 */
async function describeAntChainContractProjects(request: DescribeAntChainContractProjectsRequest): DescribeAntChainContractProjectsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainContractProjectsWithOptions(request, runtime);
}

model DescribeAntChainContractProjectsV2Request {
  consortiumId?: string(name='ConsortiumId', description='This parameter is required.', example='M8GaMEyX'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
}

model DescribeAntChainContractProjectsV2ResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: string(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='D68D66B6-1964-4073-8714-B49F5EF1AEFC'),
  result?: {
    contractProjects?: [ 
      {
        consortiumId?: string(name='ConsortiumId', example='M8GaMEyX'),
        createTime?: long(name='CreateTime', example='1609848383000'),
        projectDescription?: string(name='ProjectDescription', example='test'),
        projectId?: string(name='ProjectId', example='RXwQj6m8'),
        projectName?: string(name='ProjectName', example='test'),
        projectVersion?: string(name='ProjectVersion', example='1.0.0'),
        updateTime?: long(name='UpdateTime', example='1609848383000'),
      }
    ](name='ContractProjects'),
    pagination?: {
      pageNumber?: int32(name='PageNumber', example='1'),
      pageSize?: int32(name='PageSize', example='10'),
      totalCount?: int32(name='TotalCount', example='100'),
    }(name='Pagination'),
  }(name='Result'),
  resultCode?: string(name='ResultCode', example='OK'),
  resultMessage?: string(name='ResultMessage', example='OK'),
  success?: boolean(name='Success', example='true'),
}

model DescribeAntChainContractProjectsV2Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainContractProjectsV2ResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainContractProjectsV2Request
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainContractProjectsV2Response
 */
async function describeAntChainContractProjectsV2WithOptions(request: DescribeAntChainContractProjectsV2Request, runtime: Util.RuntimeOptions): DescribeAntChainContractProjectsV2Response {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainContractProjectsV2',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainContractProjectsV2Request
 * @return DescribeAntChainContractProjectsV2Response
 */
async function describeAntChainContractProjectsV2(request: DescribeAntChainContractProjectsV2Request): DescribeAntChainContractProjectsV2Response {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainContractProjectsV2WithOptions(request, runtime);
}

model DescribeAntChainDownloadPathsRequest {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='1q8B5R9p'),
}

model DescribeAntChainDownloadPathsResponseBody = {
  requestId?: string(name='RequestId', example='E6F487D4-8606-41B5-B289-46D5EFBD3417'),
  result?: {
    caCrtUrl?: string(name='CaCrtUrl', example='http://***ca.crt'),
    clientCrtUrl?: string(name='ClientCrtUrl', example='http://***client.crt'),
    sdkUrl?: string(name='SdkUrl', example='http://***'),
    trustCaUrl?: string(name='TrustCaUrl', example='http://***trustCa'),
  }(name='Result'),
}

model DescribeAntChainDownloadPathsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainDownloadPathsResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainDownloadPathsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainDownloadPathsResponse
 */
async function describeAntChainDownloadPathsWithOptions(request: DescribeAntChainDownloadPathsRequest, runtime: Util.RuntimeOptions): DescribeAntChainDownloadPathsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainDownloadPaths',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainDownloadPathsRequest
 * @return DescribeAntChainDownloadPathsResponse
 */
async function describeAntChainDownloadPaths(request: DescribeAntChainDownloadPathsRequest): DescribeAntChainDownloadPathsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainDownloadPathsWithOptions(request, runtime);
}

model DescribeAntChainDownloadPathsV2Request {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='8bd720bde18c4b37b0f4a1c7834db163'),
  consortiumId?: string(name='ConsortiumId', example='M8GaMEyX'),
}

model DescribeAntChainDownloadPathsV2ResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: string(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='D68D66B6-1964-4073-8714-B49F5EF1AEFC'),
  result?: {
    caCrtUrl?: string(name='CaCrtUrl', example='http://***ca.crt'),
    clientCrtUrl?: string(name='ClientCrtUrl', example='http://***client.crt'),
    sdkUrl?: string(name='SdkUrl', example='http://***'),
    trustCaUrl?: string(name='TrustCaUrl', example='http://***trustCa'),
  }(name='Result'),
  resultCode?: string(name='ResultCode', example='OK'),
  resultMessage?: string(name='ResultMessage', example='OK'),
  success?: boolean(name='Success', example='true'),
}

model DescribeAntChainDownloadPathsV2Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainDownloadPathsV2ResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainDownloadPathsV2Request
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainDownloadPathsV2Response
 */
async function describeAntChainDownloadPathsV2WithOptions(request: DescribeAntChainDownloadPathsV2Request, runtime: Util.RuntimeOptions): DescribeAntChainDownloadPathsV2Response {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainDownloadPathsV2',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainDownloadPathsV2Request
 * @return DescribeAntChainDownloadPathsV2Response
 */
async function describeAntChainDownloadPathsV2(request: DescribeAntChainDownloadPathsV2Request): DescribeAntChainDownloadPathsV2Response {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainDownloadPathsV2WithOptions(request, runtime);
}

model DescribeAntChainInformationRequest {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='pYogqb9v'),
}

model DescribeAntChainInformationResponseBody = {
  requestId?: string(name='RequestId', example='91246411-C7E9-4EFD-9074-3939AEDFC1BB'),
  result?: {
    abnormalNodes?: int32(name='AbnormalNodes', example='0'),
    antChainId?: string(name='AntChainId', example='pYogqb9v'),
    blockHeight?: int32(name='BlockHeight', example='365236'),
    createTime?: long(name='CreateTime', example='1562847396000'),
    nodeInfos?: [ 
      {
        blockHeight?: long(name='BlockHeight', example='365216'),
        nodeName?: string(name='NodeName', example='121.199.195.8 18130'),
        status?: boolean(name='Status', example='true'),
        version?: string(name='Version', example='0.10'),
      }
    ](name='NodeInfos'),
    nodeNumber?: int32(name='NodeNumber', example='4'),
    normal?: boolean(name='Normal', example='true'),
    transactionSum?: int32(name='TransactionSum', example='42'),
    version?: string(name='Version', example='0.10.2.4.7'),
  }(name='Result'),
}

model DescribeAntChainInformationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainInformationResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainInformationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainInformationResponse
 */
async function describeAntChainInformationWithOptions(request: DescribeAntChainInformationRequest, runtime: Util.RuntimeOptions): DescribeAntChainInformationResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainInformation',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainInformationRequest
 * @return DescribeAntChainInformationResponse
 */
async function describeAntChainInformation(request: DescribeAntChainInformationRequest): DescribeAntChainInformationResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainInformationWithOptions(request, runtime);
}

model DescribeAntChainInformationV2Request {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='8bd720bde18c4b37b0f4a1c7834db163'),
  consortiumId?: string(name='ConsortiumId', example='M8GaMEyX'),
}

model DescribeAntChainInformationV2ResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: string(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='D68D66B6-1964-4073-8714-B49F5EF1AEFC'),
  result?: {
    abnormalNodes?: int32(name='AbnormalNodes', example='0'),
    antChainId?: string(name='AntChainId', example='8bd720bde18c4b37b0f4a1c7834db163'),
    blockHeight?: int32(name='BlockHeight', example='259988'),
    createTime?: long(name='CreateTime', example='1609221924000'),
    isRole?: boolean(name='IsRole', example='false'),
    nodeInfos?: [ 
      {
        blockHeight?: long(name='BlockHeight', example='259988'),
        nodeName?: string(name='NodeName', example='8.136.158.115 18130'),
        status?: boolean(name='Status', example='true'),
        version?: string(name='Version', example='0.10'),
      }
    ](name='NodeInfos'),
    nodeNumber?: int32(name='NodeNumber', example='4'),
    normal?: boolean(name='Normal', example='true'),
    transactionSum?: int32(name='TransactionSum', example='6'),
    version?: string(name='Version', example='0.10'),
  }(name='Result'),
  resultCode?: string(name='ResultCode', example='OK'),
  resultMessage?: string(name='ResultMessage', example='OK'),
  success?: boolean(name='Success', example='true'),
}

model DescribeAntChainInformationV2Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainInformationV2ResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainInformationV2Request
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainInformationV2Response
 */
async function describeAntChainInformationV2WithOptions(request: DescribeAntChainInformationV2Request, runtime: Util.RuntimeOptions): DescribeAntChainInformationV2Response {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainInformationV2',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainInformationV2Request
 * @return DescribeAntChainInformationV2Response
 */
async function describeAntChainInformationV2(request: DescribeAntChainInformationV2Request): DescribeAntChainInformationV2Response {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainInformationV2WithOptions(request, runtime);
}

model DescribeAntChainLatestBlocksRequest {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='pYogqb9v'),
}

model DescribeAntChainLatestBlocksResponseBody = {
  requestId?: string(name='RequestId', example='B52C552F-DDE6-4779-9BA2-9DD455275528'),
  result?: [  map[string]any ](name='Result'),
}

model DescribeAntChainLatestBlocksResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainLatestBlocksResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainLatestBlocksRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainLatestBlocksResponse
 */
async function describeAntChainLatestBlocksWithOptions(request: DescribeAntChainLatestBlocksRequest, runtime: Util.RuntimeOptions): DescribeAntChainLatestBlocksResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainLatestBlocks',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainLatestBlocksRequest
 * @return DescribeAntChainLatestBlocksResponse
 */
async function describeAntChainLatestBlocks(request: DescribeAntChainLatestBlocksRequest): DescribeAntChainLatestBlocksResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainLatestBlocksWithOptions(request, runtime);
}

model DescribeAntChainLatestBlocksV2Request {
  antChainId?: string(name='AntChainId', description='This parameter is required.'),
  consortiumId?: string(name='ConsortiumId', example='M8GaMEyX'),
}

model DescribeAntChainLatestBlocksV2ResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: string(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='D68D66B6-1964-4073-8714-B49F5EF1AEFC'),
  result?: [ 
    {
      alias?: string(name='Alias', example='8bd720bde18c4b37b0f4a1c7834db163'),
      bizData?: string(name='BizData', example='b21baa257788d97eb0006672ccc5008f465365e1dec88d0bbd833e150414b3d5'),
      blockHash?: string(name='BlockHash', example='b21baa257788d97eb0006672ccc5008f465365e1dec88d0bbd833e150414b3d5'),
      createTime?: long(name='CreateTime', example='1610002621000'),
      height?: long(name='Height', example='259808'),
      previousHash?: string(name='PreviousHash', example='f208834bdc72bd6bb05c5ef1a35abbc8295a16deda9526b7b78c69ec24591b9f'),
      rootTxHash?: string(name='RootTxHash', example='0000000000000000000000000000000000000000000000000000000000000000'),
      size?: long(name='Size', example='1024'),
      transactionSize?: long(name='TransactionSize', example='0'),
      version?: long(name='Version', example='33556226'),
    }
  ](name='Result'),
  resultCode?: string(name='ResultCode', example='OK'),
  resultMessage?: string(name='ResultMessage', example='OK'),
  success?: boolean(name='Success', example='true'),
}

model DescribeAntChainLatestBlocksV2Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainLatestBlocksV2ResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainLatestBlocksV2Request
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainLatestBlocksV2Response
 */
async function describeAntChainLatestBlocksV2WithOptions(request: DescribeAntChainLatestBlocksV2Request, runtime: Util.RuntimeOptions): DescribeAntChainLatestBlocksV2Response {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainLatestBlocksV2',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainLatestBlocksV2Request
 * @return DescribeAntChainLatestBlocksV2Response
 */
async function describeAntChainLatestBlocksV2(request: DescribeAntChainLatestBlocksV2Request): DescribeAntChainLatestBlocksV2Response {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainLatestBlocksV2WithOptions(request, runtime);
}

model DescribeAntChainLatestTransactionDigestsRequest {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='pYogqb9v'),
}

model DescribeAntChainLatestTransactionDigestsResponseBody = {
  requestId?: string(name='RequestId', example='3348160E-187B-47BD-B1B9-76AD4AFA4558'),
  result?: [  map[string]any ](name='Result'),
}

model DescribeAntChainLatestTransactionDigestsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainLatestTransactionDigestsResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainLatestTransactionDigestsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainLatestTransactionDigestsResponse
 */
async function describeAntChainLatestTransactionDigestsWithOptions(request: DescribeAntChainLatestTransactionDigestsRequest, runtime: Util.RuntimeOptions): DescribeAntChainLatestTransactionDigestsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainLatestTransactionDigests',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainLatestTransactionDigestsRequest
 * @return DescribeAntChainLatestTransactionDigestsResponse
 */
async function describeAntChainLatestTransactionDigests(request: DescribeAntChainLatestTransactionDigestsRequest): DescribeAntChainLatestTransactionDigestsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainLatestTransactionDigestsWithOptions(request, runtime);
}

model DescribeAntChainLatestTransactionDigestsV2Request {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='8bd720bde18c4b37b0f4a1c7834db163'),
  consortiumId?: string(name='ConsortiumId', example='M8GaMEyX'),
}

model DescribeAntChainLatestTransactionDigestsV2ResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: string(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='D68D66B6-1964-4073-8714-B49F5EF1AEFC'),
  result?: [ string ](name='Result'),
  resultCode?: string(name='ResultCode', example='OK'),
  resultMessage?: string(name='ResultMessage', example='OK'),
  success?: boolean(name='Success', example='true'),
}

model DescribeAntChainLatestTransactionDigestsV2Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainLatestTransactionDigestsV2ResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainLatestTransactionDigestsV2Request
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainLatestTransactionDigestsV2Response
 */
async function describeAntChainLatestTransactionDigestsV2WithOptions(request: DescribeAntChainLatestTransactionDigestsV2Request, runtime: Util.RuntimeOptions): DescribeAntChainLatestTransactionDigestsV2Response {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainLatestTransactionDigestsV2',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainLatestTransactionDigestsV2Request
 * @return DescribeAntChainLatestTransactionDigestsV2Response
 */
async function describeAntChainLatestTransactionDigestsV2(request: DescribeAntChainLatestTransactionDigestsV2Request): DescribeAntChainLatestTransactionDigestsV2Response {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainLatestTransactionDigestsV2WithOptions(request, runtime);
}

model DescribeAntChainMembersRequest {
  consortiumId?: string(name='ConsortiumId', description='This parameter is required.', example='q0oWq92P'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
}

model DescribeAntChainMembersResponseBody = {
  requestId?: string(name='RequestId', example='E0DB75A2-28C8-4295-8851-A157FFB3DFED'),
  result?: {
    members?: [ 
      {
        joinTime?: long(name='JoinTime', example='1557477823000'),
        memberId?: string(name='MemberId', example='uid-1388601577407805'),
        memberName?: string(name='MemberName', example='uid-1562589998337656'),
        role?: string(name='Role', example='Member'),
        status?: string(name='Status', example='AllianceNotJoined'),
      }
    ](name='Members'),
    pagination?: {
      pageNumber?: int32(name='PageNumber', example='1'),
      pageSize?: int32(name='PageSize', example='10'),
      totalCount?: int32(name='TotalCount', example='6'),
    }(name='Pagination'),
  }(name='Result'),
}

model DescribeAntChainMembersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainMembersResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainMembersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainMembersResponse
 */
async function describeAntChainMembersWithOptions(request: DescribeAntChainMembersRequest, runtime: Util.RuntimeOptions): DescribeAntChainMembersResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainMembers',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainMembersRequest
 * @return DescribeAntChainMembersResponse
 */
async function describeAntChainMembers(request: DescribeAntChainMembersRequest): DescribeAntChainMembersResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainMembersWithOptions(request, runtime);
}

model DescribeAntChainMembersV2Request {
  consortiumId?: string(name='ConsortiumId', description='This parameter is required.', example='M8GaMEyX'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
}

model DescribeAntChainMembersV2ResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: string(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='D68D66B6-1964-4073-8714-B49F5EF1AEFC'),
  result?: {
    members?: [ 
      {
        joinTime?: long(name='JoinTime', example='1609745002000'),
        memberId?: string(name='MemberId', example='1034774750177934'),
        memberName?: string(name='MemberName', example='uid-1034774750177934'),
        role?: string(name='Role', example='Member'),
        status?: string(name='Status', example='AllianceJoined'),
      }
    ](name='Members'),
    pagination?: {
      pageNumber?: int32(name='PageNumber', example='1'),
      pageSize?: int32(name='PageSize', example='10'),
      totalCount?: int32(name='TotalCount', example='100'),
    }(name='Pagination'),
  }(name='Result'),
  resultCode?: string(name='ResultCode', example='OK'),
  resultMessage?: string(name='ResultMessage', example='OK'),
  success?: boolean(name='Success', example='true'),
}

model DescribeAntChainMembersV2Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainMembersV2ResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainMembersV2Request
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainMembersV2Response
 */
async function describeAntChainMembersV2WithOptions(request: DescribeAntChainMembersV2Request, runtime: Util.RuntimeOptions): DescribeAntChainMembersV2Response {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainMembersV2',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainMembersV2Request
 * @return DescribeAntChainMembersV2Response
 */
async function describeAntChainMembersV2(request: DescribeAntChainMembersV2Request): DescribeAntChainMembersV2Response {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainMembersV2WithOptions(request, runtime);
}

model DescribeAntChainMiniAppBrowserQRCodeAccessLogRequest {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='bDXK6boZ'),
  QRCodeType?: string(name='QRCodeType', description='This parameter is required.', example='MINI_APP_BROWSER_TRANSACTION'),
}

model DescribeAntChainMiniAppBrowserQRCodeAccessLogResponseBody = {
  requestId?: string(name='RequestId', example='D68D66B6-1964-4073-8714-B49F5EF1AEFC'),
  result?: {
    accessAlipayAccountCount?: long(name='AccessAlipayAccountCount', example='100'),
    accessCount?: long(name='AccessCount', example='1000'),
  }(name='Result'),
}

model DescribeAntChainMiniAppBrowserQRCodeAccessLogResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainMiniAppBrowserQRCodeAccessLogResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainMiniAppBrowserQRCodeAccessLogRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainMiniAppBrowserQRCodeAccessLogResponse
 */
async function describeAntChainMiniAppBrowserQRCodeAccessLogWithOptions(request: DescribeAntChainMiniAppBrowserQRCodeAccessLogRequest, runtime: Util.RuntimeOptions): DescribeAntChainMiniAppBrowserQRCodeAccessLogResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.QRCodeType)) {
    body['QRCodeType'] = request.QRCodeType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainMiniAppBrowserQRCodeAccessLog',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainMiniAppBrowserQRCodeAccessLogRequest
 * @return DescribeAntChainMiniAppBrowserQRCodeAccessLogResponse
 */
async function describeAntChainMiniAppBrowserQRCodeAccessLog(request: DescribeAntChainMiniAppBrowserQRCodeAccessLogRequest): DescribeAntChainMiniAppBrowserQRCodeAccessLogResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainMiniAppBrowserQRCodeAccessLogWithOptions(request, runtime);
}

model DescribeAntChainMiniAppBrowserQRCodeAccessLogV2Request {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='8bd720bde18c4b37b0f4a1c7834db163'),
  QRCodeType?: string(name='QRCodeType', description='This parameter is required.', example='MINI_APP_BROWSER_TRANSACTION'),
}

model DescribeAntChainMiniAppBrowserQRCodeAccessLogV2ResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: string(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='D68D66B6-1964-4073-8714-B49F5EF1AEFC'),
  result?: {
    accessAlipayAccountCount?: long(name='AccessAlipayAccountCount', example='10'),
    accessCount?: long(name='AccessCount', example='100'),
  }(name='Result'),
  resultCode?: string(name='ResultCode', example='OK'),
  resultMessage?: string(name='ResultMessage', example='OK'),
  success?: boolean(name='Success', example='true'),
}

model DescribeAntChainMiniAppBrowserQRCodeAccessLogV2Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainMiniAppBrowserQRCodeAccessLogV2ResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainMiniAppBrowserQRCodeAccessLogV2Request
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainMiniAppBrowserQRCodeAccessLogV2Response
 */
async function describeAntChainMiniAppBrowserQRCodeAccessLogV2WithOptions(request: DescribeAntChainMiniAppBrowserQRCodeAccessLogV2Request, runtime: Util.RuntimeOptions): DescribeAntChainMiniAppBrowserQRCodeAccessLogV2Response {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.QRCodeType)) {
    body['QRCodeType'] = request.QRCodeType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainMiniAppBrowserQRCodeAccessLogV2',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainMiniAppBrowserQRCodeAccessLogV2Request
 * @return DescribeAntChainMiniAppBrowserQRCodeAccessLogV2Response
 */
async function describeAntChainMiniAppBrowserQRCodeAccessLogV2(request: DescribeAntChainMiniAppBrowserQRCodeAccessLogV2Request): DescribeAntChainMiniAppBrowserQRCodeAccessLogV2Response {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainMiniAppBrowserQRCodeAccessLogV2WithOptions(request, runtime);
}

model DescribeAntChainMiniAppBrowserQRCodeAuthorizedUsersRequest {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='bDXK6boZ'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
  QRCodeType?: string(name='QRCodeType', description='This parameter is required.', example='MINI_APP_BROWSER_TRANSACTION'),
}

model DescribeAntChainMiniAppBrowserQRCodeAuthorizedUsersResponseBody = {
  requestId?: string(name='RequestId', example='D68D66B6-1964-4073-8714-B49F5EF1AEFC'),
  result?: {
    antChainId?: string(name='AntChainId', example='bDXK6boZ'),
    authorizationType?: string(name='AuthorizationType', example='ALL_USER_AUTHORIZATION'),
    authorizedUserList?: [ 
      {
        gmtAuthorized?: string(name='GmtAuthorized', example='1580958389000'),
        phone?: string(name='Phone', example='1380013****'),
      }
    ](name='AuthorizedUserList'),
    pagination?: {
      pageNumber?: int32(name='PageNumber', example='10'),
      pageSize?: int32(name='PageSize', example='1'),
      totalCount?: int32(name='TotalCount', example='100'),
    }(name='Pagination'),
    QRCodeType?: string(name='QRCodeType', example='MINI_APP_BROWSER_TRANSACTION'),
  }(name='Result'),
}

model DescribeAntChainMiniAppBrowserQRCodeAuthorizedUsersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainMiniAppBrowserQRCodeAuthorizedUsersResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainMiniAppBrowserQRCodeAuthorizedUsersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainMiniAppBrowserQRCodeAuthorizedUsersResponse
 */
async function describeAntChainMiniAppBrowserQRCodeAuthorizedUsersWithOptions(request: DescribeAntChainMiniAppBrowserQRCodeAuthorizedUsersRequest, runtime: Util.RuntimeOptions): DescribeAntChainMiniAppBrowserQRCodeAuthorizedUsersResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.QRCodeType)) {
    body['QRCodeType'] = request.QRCodeType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainMiniAppBrowserQRCodeAuthorizedUsers',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainMiniAppBrowserQRCodeAuthorizedUsersRequest
 * @return DescribeAntChainMiniAppBrowserQRCodeAuthorizedUsersResponse
 */
async function describeAntChainMiniAppBrowserQRCodeAuthorizedUsers(request: DescribeAntChainMiniAppBrowserQRCodeAuthorizedUsersRequest): DescribeAntChainMiniAppBrowserQRCodeAuthorizedUsersResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainMiniAppBrowserQRCodeAuthorizedUsersWithOptions(request, runtime);
}

model DescribeAntChainMiniAppBrowserQRCodeAuthorizedUsersV2Request {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='8bd720bde18c4b37b0f4a1c7834db163'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
  QRCodeType?: string(name='QRCodeType', description='This parameter is required.', example='MINI_APP_BROWSER_TRANSACTION'),
}

model DescribeAntChainMiniAppBrowserQRCodeAuthorizedUsersV2ResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: string(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='D68D66B6-1964-4073-8714-B49F5EF1AEFC'),
  result?: {
    antChainId?: string(name='AntChainId', example='4505A1E4-0EDD-4A02-A4D7-B49219328D49'),
    authorizationType?: string(name='AuthorizationType', example='SPECIFIC_USER_AUTHORIZATION'),
    authorizedUserList?: [ 
      {
        gmtAuthorized?: string(name='GmtAuthorized', example='2021-01-07 10:55:42'),
        phone?: string(name='Phone', example='1380013****'),
      }
    ](name='AuthorizedUserList'),
    pagination?: {
      pageNumber?: int32(name='PageNumber', example='1'),
      pageSize?: int32(name='PageSize', example='10'),
      totalCount?: int32(name='TotalCount', example='100'),
    }(name='Pagination'),
    QRCodeType?: string(name='QRCodeType', example='MINI_APP_BROWSER_TRANSACTION'),
  }(name='Result'),
  resultCode?: string(name='ResultCode', example='OK'),
  resultMessage?: string(name='ResultMessage', example='OK'),
  success?: boolean(name='Success', example='true'),
}

model DescribeAntChainMiniAppBrowserQRCodeAuthorizedUsersV2Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainMiniAppBrowserQRCodeAuthorizedUsersV2ResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainMiniAppBrowserQRCodeAuthorizedUsersV2Request
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainMiniAppBrowserQRCodeAuthorizedUsersV2Response
 */
async function describeAntChainMiniAppBrowserQRCodeAuthorizedUsersV2WithOptions(request: DescribeAntChainMiniAppBrowserQRCodeAuthorizedUsersV2Request, runtime: Util.RuntimeOptions): DescribeAntChainMiniAppBrowserQRCodeAuthorizedUsersV2Response {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.QRCodeType)) {
    body['QRCodeType'] = request.QRCodeType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainMiniAppBrowserQRCodeAuthorizedUsersV2',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainMiniAppBrowserQRCodeAuthorizedUsersV2Request
 * @return DescribeAntChainMiniAppBrowserQRCodeAuthorizedUsersV2Response
 */
async function describeAntChainMiniAppBrowserQRCodeAuthorizedUsersV2(request: DescribeAntChainMiniAppBrowserQRCodeAuthorizedUsersV2Request): DescribeAntChainMiniAppBrowserQRCodeAuthorizedUsersV2Response {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainMiniAppBrowserQRCodeAuthorizedUsersV2WithOptions(request, runtime);
}

model DescribeAntChainMiniAppBrowserTransactionQRCodeRequest {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='bDXK6boZ'),
  transactionHash?: string(name='TransactionHash', description='This parameter is required.', example='4a1f1371012cf840a9e4c6bde430d5ba600e422e592d153bd2689783cd1f87d0'),
}

model DescribeAntChainMiniAppBrowserTransactionQRCodeResponseBody = {
  requestId?: string(name='RequestId', example='D68D66B6-1964-4073-8714-B49F5EF1AEFC'),
  result?: {
    antChainId?: string(name='AntChainId', example='bDXK6boZ'),
    base64QRCodePNG?: string(name='Base64QRCodePNG', example='iVBORw0KGgo......ABJRU5ErkJggg=='),
    QRCodeContent?: string(name='QRCodeContent', example='https://render.antfin.com/p/s/miniapp-web/?type=trans&from=aliyun&bizid=bDXK6boZ&hash=10692388f8b729cbb42d2985eebd3567812def357eb826a7ec810ce97e1f295e'),
    transactionHash?: string(name='TransactionHash', example='10692388f8b729cbb42d2985eebd3567812def357eb826a7ec810ce97e1f295e'),
  }(name='Result'),
}

model DescribeAntChainMiniAppBrowserTransactionQRCodeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainMiniAppBrowserTransactionQRCodeResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainMiniAppBrowserTransactionQRCodeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainMiniAppBrowserTransactionQRCodeResponse
 */
async function describeAntChainMiniAppBrowserTransactionQRCodeWithOptions(request: DescribeAntChainMiniAppBrowserTransactionQRCodeRequest, runtime: Util.RuntimeOptions): DescribeAntChainMiniAppBrowserTransactionQRCodeResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.transactionHash)) {
    body['TransactionHash'] = request.transactionHash;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainMiniAppBrowserTransactionQRCode',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainMiniAppBrowserTransactionQRCodeRequest
 * @return DescribeAntChainMiniAppBrowserTransactionQRCodeResponse
 */
async function describeAntChainMiniAppBrowserTransactionQRCode(request: DescribeAntChainMiniAppBrowserTransactionQRCodeRequest): DescribeAntChainMiniAppBrowserTransactionQRCodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainMiniAppBrowserTransactionQRCodeWithOptions(request, runtime);
}

model DescribeAntChainMiniAppBrowserTransactionQRCodeNewRequest {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='bDXK6boZ'),
  contractId?: string(name='ContractId', example='9782291a957d28bec9e02f3dcb27d78392815ede7670b70793e0fd9763309cda'),
  transactionHash?: string(name='TransactionHash', description='This parameter is required.', example='4a1f1371012cf840a9e4c6bde430d5ba600e422e592d153bd2689783cd1f87d0'),
}

model DescribeAntChainMiniAppBrowserTransactionQRCodeNewResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: string(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='D68D66B6-1964-4073-8714-B49F5EF1AEFC'),
  result?: {
    antChainId?: string(name='AntChainId', example='8bd720bde18c4b37b0f4a1c7834db163'),
    base64QRCodePNG?: string(name='Base64QRCodePNG', example='iVBORw0KGgoAAAANSUhEUgAAAPAAAADwCAIAAACxN37FAAAcb0lEQVR42u3dCZAc1XkAYGlPSRZIGIwEtos4tlM4lE05hhBsU'),
    QRCodeContent?: string(name='QRCodeContent', example='https://render.antfin.com/p/s/miniapp-web/?type=trans&from=aliyun&bizid=8bd720bde18c4b37b0f4a1c7834db163&hash=ac73c8fa158436513e0b398632d9a082e04cee3eac6f9fb50087a46d801bdfd1&contractId='),
    transactionHash?: string(name='TransactionHash', example='ac73c8fa158436513e0b398632d9a082e04cee3eac6f9fb50087a46d801bdfd1'),
  }(name='Result'),
  resultCode?: string(name='ResultCode', example='OK'),
  resultMessage?: string(name='ResultMessage', example='OK'),
  success?: boolean(name='Success', example='true'),
}

model DescribeAntChainMiniAppBrowserTransactionQRCodeNewResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainMiniAppBrowserTransactionQRCodeNewResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainMiniAppBrowserTransactionQRCodeNewRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainMiniAppBrowserTransactionQRCodeNewResponse
 */
async function describeAntChainMiniAppBrowserTransactionQRCodeNewWithOptions(request: DescribeAntChainMiniAppBrowserTransactionQRCodeNewRequest, runtime: Util.RuntimeOptions): DescribeAntChainMiniAppBrowserTransactionQRCodeNewResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.contractId)) {
    body['ContractId'] = request.contractId;
  }
  if (!Util.isUnset(request.transactionHash)) {
    body['TransactionHash'] = request.transactionHash;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainMiniAppBrowserTransactionQRCodeNew',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainMiniAppBrowserTransactionQRCodeNewRequest
 * @return DescribeAntChainMiniAppBrowserTransactionQRCodeNewResponse
 */
async function describeAntChainMiniAppBrowserTransactionQRCodeNew(request: DescribeAntChainMiniAppBrowserTransactionQRCodeNewRequest): DescribeAntChainMiniAppBrowserTransactionQRCodeNewResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainMiniAppBrowserTransactionQRCodeNewWithOptions(request, runtime);
}

model DescribeAntChainNodesRequest {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='1q8B5R9p'),
}

model DescribeAntChainNodesResponseBody = {
  requestId?: string(name='RequestId', example='BA9738FE-F427-44FD-A1D9-EB4EFB43075A'),
  result?: [  map[string]any ](name='Result'),
}

model DescribeAntChainNodesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainNodesResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainNodesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainNodesResponse
 */
async function describeAntChainNodesWithOptions(request: DescribeAntChainNodesRequest, runtime: Util.RuntimeOptions): DescribeAntChainNodesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainNodes',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainNodesRequest
 * @return DescribeAntChainNodesResponse
 */
async function describeAntChainNodes(request: DescribeAntChainNodesRequest): DescribeAntChainNodesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainNodesWithOptions(request, runtime);
}

model DescribeAntChainNodesV2Request {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='8bd720bde18c4b37b0f4a1c7834db163'),
  consortiumId?: string(name='ConsortiumId', example='M8GaMEyX'),
}

model DescribeAntChainNodesV2ResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: string(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='D68D66B6-1964-4073-8714-B49F5EF1AEFC'),
  result?: [ string ](name='Result'),
  resultCode?: string(name='ResultCode', example='OK'),
  resultMessage?: string(name='ResultMessage', example='OK'),
  success?: boolean(name='Success', example='true'),
}

model DescribeAntChainNodesV2Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainNodesV2ResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainNodesV2Request
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainNodesV2Response
 */
async function describeAntChainNodesV2WithOptions(request: DescribeAntChainNodesV2Request, runtime: Util.RuntimeOptions): DescribeAntChainNodesV2Response {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainNodesV2',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainNodesV2Request
 * @return DescribeAntChainNodesV2Response
 */
async function describeAntChainNodesV2(request: DescribeAntChainNodesV2Request): DescribeAntChainNodesV2Response {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainNodesV2WithOptions(request, runtime);
}

model DescribeAntChainQRCodeAuthorizationRequest {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='bDXK6boZ'),
  QRCodeType?: string(name='QRCodeType', description='This parameter is required.', example='MINI_APP_BROWSER_TRANSACTION'),
}

model DescribeAntChainQRCodeAuthorizationResponseBody = {
  requestId?: string(name='RequestId', example='D68D66B6-1964-4073-8714-B49F5EF1AEFC'),
  result?: {
    antChainId?: string(name='AntChainId', example='bDXK6boZ'),
    authorizationType?: string(name='AuthorizationType', example='ALL_USER_AUTHORIZATION'),
    QRCodeType?: string(name='QRCodeType', example='MINI_APP_BROWSER_TRANSACTION'),
  }(name='Result'),
}

model DescribeAntChainQRCodeAuthorizationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainQRCodeAuthorizationResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainQRCodeAuthorizationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainQRCodeAuthorizationResponse
 */
async function describeAntChainQRCodeAuthorizationWithOptions(request: DescribeAntChainQRCodeAuthorizationRequest, runtime: Util.RuntimeOptions): DescribeAntChainQRCodeAuthorizationResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.QRCodeType)) {
    body['QRCodeType'] = request.QRCodeType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainQRCodeAuthorization',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainQRCodeAuthorizationRequest
 * @return DescribeAntChainQRCodeAuthorizationResponse
 */
async function describeAntChainQRCodeAuthorization(request: DescribeAntChainQRCodeAuthorizationRequest): DescribeAntChainQRCodeAuthorizationResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainQRCodeAuthorizationWithOptions(request, runtime);
}

model DescribeAntChainQRCodeAuthorizationV2Request {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='8bd720bde18c4b37b0f4a1c7834db163'),
  QRCodeType?: string(name='QRCodeType', description='This parameter is required.', example='MINI_APP_BROWSER_TRANSACTION'),
}

model DescribeAntChainQRCodeAuthorizationV2ResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: string(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='980061FC-058D-4298-8598-D9DDB10D0ED4'),
  result?: {
    antChainId?: string(name='AntChainId', example='8bd720bde18c4b37b0f4a1c7834db163'),
    authorizationType?: string(name='AuthorizationType', example='ALL_USER_AUTHORIZATION'),
    QRCodeType?: string(name='QRCodeType', example='MINI_APP_BROWSER_TRANSACTION'),
  }(name='Result'),
  resultCode?: string(name='ResultCode', example='OK'),
  resultMessage?: string(name='ResultMessage', example='OK'),
  success?: boolean(name='Success', example='true'),
}

model DescribeAntChainQRCodeAuthorizationV2Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainQRCodeAuthorizationV2ResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainQRCodeAuthorizationV2Request
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainQRCodeAuthorizationV2Response
 */
async function describeAntChainQRCodeAuthorizationV2WithOptions(request: DescribeAntChainQRCodeAuthorizationV2Request, runtime: Util.RuntimeOptions): DescribeAntChainQRCodeAuthorizationV2Response {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.QRCodeType)) {
    body['QRCodeType'] = request.QRCodeType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainQRCodeAuthorizationV2',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainQRCodeAuthorizationV2Request
 * @return DescribeAntChainQRCodeAuthorizationV2Response
 */
async function describeAntChainQRCodeAuthorizationV2(request: DescribeAntChainQRCodeAuthorizationV2Request): DescribeAntChainQRCodeAuthorizationV2Response {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainQRCodeAuthorizationV2WithOptions(request, runtime);
}

model DescribeAntChainTransactionRequest {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='pYogqb9v'),
  hash?: string(name='Hash', description='This parameter is required.', example='b3b0d2db83d3e670449d1e2a39d1d13b7e0e6080b0f9c6945f79eca68d1dd2ca'),
}

model DescribeAntChainTransactionResponseBody = {
  requestId?: string(name='RequestId', example='7DCE6520-E5DB-4859-90AC-BDDB8A5501C6'),
  result?: {
    blockHash?: string(name='BlockHash', example='1168bc5dd0b78d15446b15ea5a7f7822a7d07c007dd3a50becf98da220fc08f6'),
    blockHeight?: long(name='BlockHeight', example='368169'),
    blockVersion?: string(name='BlockVersion', example='10'),
    createTime?: long(name='CreateTime', example='1563954336850'),
    hash?: string(name='Hash', example='b3b0d2db83d3e670449d1e2a39d1d13b7e0e6080b0f9c6945f79eca68d1dd2ca'),
    transaction?: {
      data?: string(name='Data', example='“”'),
      extentions?: [ string ](name='Extentions'),
      from?: string(name='From', example='e7d3e769f3f593dadcb8634cc5b09fc90dd3a61c4a06a79cb0923662fe6fae6b'),
      gas?: string(name='Gas', example='4000000'),
      hash?: string(name='Hash', example='b3b0d2db83d3e670449d1e2a39d1d13b7e0e6080b0f9c6945f79eca68d1dd2ca'),
      nonce?: string(name='Nonce', example='5675407026657953619'),
      period?: long(name='Period', description='Period', example='1563954336850'),
      signatures?: [ string ](name='Signatures'),
      timestamp?: long(name='Timestamp', example='1563954336850'),
      to?: string(name='To', example='961085f3c7ef705ad587d0cbe11d7863a5a11af7451f4e9b1edadd74402addf5'),
      txType?: string(name='TxType', example='UNFREEZE_ACCOUNT_CONTRACT'),
      value?: string(name='Value', example='0'),
    }(name='Transaction'),
  }(name='Result'),
}

model DescribeAntChainTransactionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainTransactionResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainTransactionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainTransactionResponse
 */
async function describeAntChainTransactionWithOptions(request: DescribeAntChainTransactionRequest, runtime: Util.RuntimeOptions): DescribeAntChainTransactionResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.hash)) {
    body['Hash'] = request.hash;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainTransaction',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainTransactionRequest
 * @return DescribeAntChainTransactionResponse
 */
async function describeAntChainTransaction(request: DescribeAntChainTransactionRequest): DescribeAntChainTransactionResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainTransactionWithOptions(request, runtime);
}

model DescribeAntChainTransactionReceiptRequest {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='pYogqb9v'),
  hash?: string(name='Hash', description='This parameter is required.', example='b3b0d2db83d3e670449d1e2a39d1d13b7e0e6080b0f9c6945f79eca68d1dd2ca'),
}

model DescribeAntChainTransactionReceiptResponseBody = {
  requestId?: string(name='RequestId', example='9EC8FDC1-ED32-4EC0-AEC2-AFAA906ADBAB'),
  result?: {
    data?: string(name='Data', example='data'),
    gasUsed?: string(name='GasUsed', example='20000'),
    logs?: [ string ](name='Logs'),
    result?: long(name='Result', example='0'),
  }(name='Result'),
}

model DescribeAntChainTransactionReceiptResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainTransactionReceiptResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainTransactionReceiptRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainTransactionReceiptResponse
 */
async function describeAntChainTransactionReceiptWithOptions(request: DescribeAntChainTransactionReceiptRequest, runtime: Util.RuntimeOptions): DescribeAntChainTransactionReceiptResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.hash)) {
    body['Hash'] = request.hash;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainTransactionReceipt',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainTransactionReceiptRequest
 * @return DescribeAntChainTransactionReceiptResponse
 */
async function describeAntChainTransactionReceipt(request: DescribeAntChainTransactionReceiptRequest): DescribeAntChainTransactionReceiptResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainTransactionReceiptWithOptions(request, runtime);
}

model DescribeAntChainTransactionReceiptV2Request {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='8bd720bde18c4b37b0f4a1c7834db163'),
  consortiumId?: string(name='ConsortiumId', example='M8GaMEyX'),
  hash?: string(name='Hash', description='This parameter is required.', example='8bd720bde18c4b37b0f4a1c7834db163'),
}

model DescribeAntChainTransactionReceiptV2ResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: string(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='D68D66B6-1964-4073-8714-B49F5EF1AEFC'),
  result?: {
    data?: string(name='Data', example='data'),
    gasUsed?: string(name='GasUsed', example='20000'),
    logs?: [ string ](name='Logs'),
    result?: long(name='Result', example='0'),
  }(name='Result'),
  resultCode?: string(name='ResultCode', example='OK'),
  resultMessage?: string(name='ResultMessage', example='OK'),
  success?: boolean(name='Success', example='true'),
}

model DescribeAntChainTransactionReceiptV2Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainTransactionReceiptV2ResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainTransactionReceiptV2Request
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainTransactionReceiptV2Response
 */
async function describeAntChainTransactionReceiptV2WithOptions(request: DescribeAntChainTransactionReceiptV2Request, runtime: Util.RuntimeOptions): DescribeAntChainTransactionReceiptV2Response {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  if (!Util.isUnset(request.hash)) {
    body['Hash'] = request.hash;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainTransactionReceiptV2',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainTransactionReceiptV2Request
 * @return DescribeAntChainTransactionReceiptV2Response
 */
async function describeAntChainTransactionReceiptV2(request: DescribeAntChainTransactionReceiptV2Request): DescribeAntChainTransactionReceiptV2Response {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainTransactionReceiptV2WithOptions(request, runtime);
}

model DescribeAntChainTransactionStatisticsRequest {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='pYogqb9v'),
  end?: long(name='End', description='This parameter is required.', example='1563897600000'),
  start?: long(name='Start', description='This parameter is required.', example='1563206400000'),
}

model DescribeAntChainTransactionStatisticsResponseBody = {
  requestId?: string(name='RequestId', example='E93884AC-6C21-4FEA-8E3A-7377D33B194F'),
  result?: [ 
    {
      antChainId?: string(name='AntChainId', example='pYogqb9v'),
      creatTime?: long(name='CreatTime', example='1563294007000'),
      dt?: string(name='Dt', example='2019-07-16'),
      lastSumBlockHeight?: long(name='LastSumBlockHeight', example='148018'),
      transCount?: long(name='TransCount', example='0'),
    }
  ](name='Result'),
}

model DescribeAntChainTransactionStatisticsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainTransactionStatisticsResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainTransactionStatisticsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainTransactionStatisticsResponse
 */
async function describeAntChainTransactionStatisticsWithOptions(request: DescribeAntChainTransactionStatisticsRequest, runtime: Util.RuntimeOptions): DescribeAntChainTransactionStatisticsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.end)) {
    body['End'] = request.end;
  }
  if (!Util.isUnset(request.start)) {
    body['Start'] = request.start;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainTransactionStatistics',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainTransactionStatisticsRequest
 * @return DescribeAntChainTransactionStatisticsResponse
 */
async function describeAntChainTransactionStatistics(request: DescribeAntChainTransactionStatisticsRequest): DescribeAntChainTransactionStatisticsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainTransactionStatisticsWithOptions(request, runtime);
}

model DescribeAntChainTransactionStatisticsV2Request {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='8bd720bde18c4b37b0f4a1c7834db163'),
  consortiumId?: string(name='ConsortiumId', example='M8GaMEyX'),
  end?: long(name='End', example='1609776000000'),
  start?: long(name='Start', example='1609084800000'),
}

model DescribeAntChainTransactionStatisticsV2ResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: string(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='D68D66B6-1964-4073-8714-B49F5EF1AEFC'),
  result?: [ 
    {
      antChainId?: string(name='AntChainId', example='8bd720bde18c4b37b0f4a1c7834db163'),
      creatTime?: long(name='CreatTime', example='1609258222000'),
      dt?: long(name='Dt', example='1609171200000'),
      lastSumBlockHeight?: long(name='LastSumBlockHeight', example='11511'),
      transCount?: long(name='TransCount', example='4'),
    }
  ](name='Result'),
  resultCode?: string(name='ResultCode', example='OK'),
  resultMessage?: string(name='ResultMessage', example='OK'),
  success?: boolean(name='Success', example='true'),
}

model DescribeAntChainTransactionStatisticsV2Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainTransactionStatisticsV2ResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainTransactionStatisticsV2Request
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainTransactionStatisticsV2Response
 */
async function describeAntChainTransactionStatisticsV2WithOptions(request: DescribeAntChainTransactionStatisticsV2Request, runtime: Util.RuntimeOptions): DescribeAntChainTransactionStatisticsV2Response {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  if (!Util.isUnset(request.end)) {
    body['End'] = request.end;
  }
  if (!Util.isUnset(request.start)) {
    body['Start'] = request.start;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainTransactionStatisticsV2',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainTransactionStatisticsV2Request
 * @return DescribeAntChainTransactionStatisticsV2Response
 */
async function describeAntChainTransactionStatisticsV2(request: DescribeAntChainTransactionStatisticsV2Request): DescribeAntChainTransactionStatisticsV2Response {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainTransactionStatisticsV2WithOptions(request, runtime);
}

model DescribeAntChainTransactionV2Request {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='8bd720bde18c4b37b0f4a1c7834db163'),
  consortiumId?: string(name='ConsortiumId', example='M8GaMEyX'),
  hash?: string(name='Hash', description='This parameter is required.', example='227072dcd1a5d78098da99ccc8024304b9fb54fc6b65e37ef919d7f2da080061'),
}

model DescribeAntChainTransactionV2ResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: string(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='D68D66B6-1964-4073-8714-B49F5EF1AEFC'),
  result?: {
    blockHash?: string(name='BlockHash', example='1168bc5dd0b78d15446b15ea5a7f7822a7d07c007dd3a50becf98da220fc08f6'),
    blockHeight?: long(name='BlockHeight', example='100'),
    blockVersion?: string(name='BlockVersion', example='10'),
    createTime?: long(name='CreateTime', example='1563954336850'),
    hash?: string(name='Hash', example='b3b0d2db83d3e670449d1e2a39d1d13b7e0e6080b0f9c6945f79eca68d1dd2ca'),
    transaction?: {
      data?: string(name='Data', example='""'),
      extentions?: [ string ](name='Extentions'),
      from?: string(name='From', example='e7d3e769f3f593dadcb8634cc5b09fc90dd3a61c4a06a79cb0923662fe6fae6b'),
      gas?: string(name='Gas', example='4000000'),
      hash?: string(name='Hash', example='b3b0d2db83d3e670449d1e2a39d1d13b7e0e6080b0f9c6945f79eca68d1dd2ca'),
      nonce?: string(name='Nonce', example='5675407026657953619'),
      period?: long(name='Period', example='1563954336850'),
      signatures?: [ string ](name='Signatures'),
      timestamp?: long(name='Timestamp', example='1563954336850'),
      to?: string(name='To', example='961085f3c7ef705ad587d0cbe11d7863a5a11af7451f4e9b1edadd74402addf5'),
      txType?: string(name='TxType', example='UNFREEZE_ACCOUNT_CONTRACT'),
      value?: string(name='Value', example='0'),
    }(name='Transaction'),
  }(name='Result'),
  resultCode?: string(name='ResultCode', example='OK'),
  resultMessage?: string(name='ResultMessage', example='OK'),
  success?: boolean(name='Success', example='true'),
}

model DescribeAntChainTransactionV2Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainTransactionV2ResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainTransactionV2Request
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainTransactionV2Response
 */
async function describeAntChainTransactionV2WithOptions(request: DescribeAntChainTransactionV2Request, runtime: Util.RuntimeOptions): DescribeAntChainTransactionV2Response {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  if (!Util.isUnset(request.hash)) {
    body['Hash'] = request.hash;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainTransactionV2',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainTransactionV2Request
 * @return DescribeAntChainTransactionV2Response
 */
async function describeAntChainTransactionV2(request: DescribeAntChainTransactionV2Request): DescribeAntChainTransactionV2Response {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainTransactionV2WithOptions(request, runtime);
}

model DescribeAntChainsRequest {
  consortiumId?: string(name='ConsortiumId', description='This parameter is required.', example='AroN3X2l'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
}

model DescribeAntChainsResponseBody = {
  requestId?: string(name='RequestId', example='52EC3196-D0B8-4FBE-A8B6-6DDABABE11C9'),
  result?: {
    antChains?: [ 
      {
        antChainId?: string(name='AntChainId', example='pYogqb9v'),
        antChainName?: string(name='AntChainName'),
        chainType?: string(name='ChainType', example='Contract'),
        cipherSuit?: string(name='CipherSuit', example='classic'),
        createTime?: long(name='CreateTime', example='1562847396000'),
        expireTime?: long(name='ExpireTime', example='1626019200000'),
        isAdmin?: boolean(name='IsAdmin', example='true'),
        memberStatus?: string(name='MemberStatus', example='ChainApplied'),
        merkleTreeSuit?: string(name='MerkleTreeSuit', example='fdmt'),
        network?: string(name='Network', example='Running'),
        nodeNum?: int32(name='NodeNum', example='4'),
        regionId?: string(name='RegionId', example='cn-hangzhou'),
        resourceSize?: string(name='ResourceSize', example='Basic'),
        tlsAlgo?: string(name='TlsAlgo', example='rsa'),
        version?: string(name='Version', example='2.19.1'),
      }
    ](name='AntChains'),
    isExist?: boolean(name='IsExist', example='false'),
    pagination?: {
      pageNumber?: int32(name='PageNumber', example='1'),
      pageSize?: int32(name='PageSize', example='20'),
      totalCount?: int32(name='TotalCount', example='1'),
    }(name='Pagination'),
  }(name='Result'),
}

model DescribeAntChainsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainsResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainsResponse
 */
async function describeAntChainsWithOptions(request: DescribeAntChainsRequest, runtime: Util.RuntimeOptions): DescribeAntChainsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChains',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainsRequest
 * @return DescribeAntChainsResponse
 */
async function describeAntChains(request: DescribeAntChainsRequest): DescribeAntChainsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainsWithOptions(request, runtime);
}

model DescribeAntChainsV2Request {
  consortiumId?: string(name='ConsortiumId', description='This parameter is required.', example='M8GaMEyX'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
}

model DescribeAntChainsV2ResponseBody = {
  code?: string(name='Code', example='OK'),
  httpStatusCode?: string(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='DBD6C69E-22B9-419E-B072-7A715F3AA330'),
  result?: {
    antChains?: [ 
      {
        antChainId?: string(name='AntChainId', example='8bd720bde18c4b37b0f4a1c7834db163'),
        antChainName?: string(name='AntChainName'),
        chainType?: string(name='ChainType', example='Contract'),
        cipherSuit?: string(name='CipherSuit', example='classic'),
        createTime?: long(name='CreateTime', example='1609221924000'),
        expireTime?: long(name='ExpireTime', example='1672329600000'),
        instanceId?: string(name='InstanceId', example='ALIYUN202012291405173265824745109'),
        isAdmin?: boolean(name='IsAdmin', example='false'),
        memberStatus?: string(name='MemberStatus', example='ChainApplied'),
        merkleTreeSuit?: string(name='MerkleTreeSuit', example='fdmt'),
        monitorStatus?: boolean(name='MonitorStatus', example='true'),
        network?: string(name='Network', example='Running'),
        nodeNum?: int32(name='NodeNum', example='4'),
        regionId?: string(name='RegionId', example='cn-hangzhou'),
        resourceSize?: string(name='ResourceSize', example='Basic'),
        restStatus?: string(name='RestStatus', example='CREATE'),
        tlsAlgo?: string(name='TlsAlgo', example='rsa'),
        version?: string(name='Version', example='2.19.1'),
      }
    ](name='AntChains'),
    isExist?: boolean(name='IsExist', example='true'),
    pagination?: {
      pageNumber?: int32(name='PageNumber', example='1'),
      pageSize?: int32(name='PageSize', example='10'),
      totalCount?: int32(name='TotalCount', example='2'),
    }(name='Pagination'),
  }(name='Result'),
  resultCode?: string(name='ResultCode', example='OK'),
  resultMessage?: string(name='ResultMessage', example='OK'),
  success?: boolean(name='Success', example='true'),
}

model DescribeAntChainsV2Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAntChainsV2ResponseBody(name='body'),
}

/**
 * @param request DescribeAntChainsV2Request
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAntChainsV2Response
 */
async function describeAntChainsV2WithOptions(request: DescribeAntChainsV2Request, runtime: Util.RuntimeOptions): DescribeAntChainsV2Response {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAntChainsV2',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAntChainsV2Request
 * @return DescribeAntChainsV2Response
 */
async function describeAntChainsV2(request: DescribeAntChainsV2Request): DescribeAntChainsV2Response {
  var runtime = new Util.RuntimeOptions{};
  return describeAntChainsV2WithOptions(request, runtime);
}

model DescribeEthereumDeletableRequest {
  ethereumId?: string(name='EthereumId', description='This parameter is required.', example='eth-1ilrhcav4ibdl'),
}

model DescribeEthereumDeletableResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='D68D66B6-1964-4073-8714-B49F5EF1AEFC'),
  result?: {
    deletable?: boolean(name='Deletable', example='true'),
    ethereumId?: string(name='EthereumId', example='eth-1ilrhcav4ibdl'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeEthereumDeletableResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEthereumDeletableResponseBody(name='body'),
}

/**
 * @param request DescribeEthereumDeletableRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeEthereumDeletableResponse
 */
async function describeEthereumDeletableWithOptions(request: DescribeEthereumDeletableRequest, runtime: Util.RuntimeOptions): DescribeEthereumDeletableResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.ethereumId)) {
    body['EthereumId'] = request.ethereumId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeEthereumDeletable',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeEthereumDeletableRequest
 * @return DescribeEthereumDeletableResponse
 */
async function describeEthereumDeletable(request: DescribeEthereumDeletableRequest): DescribeEthereumDeletableResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeEthereumDeletableWithOptions(request, runtime);
}

model DescribeFabricCandidateOrganizationsRequest {
  location?: string(name='Location', example='cn-hangzhou'),
}

model DescribeFabricCandidateOrganizationsResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: [ 
    {
      clusterState?: string(name='ClusterState', example='Running'),
      organizationId?: string(name='OrganizationId', example='peers-1oxw31d04****'),
      organizationName?: string(name='OrganizationName', example='org1'),
      serviceState?: string(name='ServiceState', example='Running'),
    }
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricCandidateOrganizationsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricCandidateOrganizationsResponseBody(name='body'),
}

/**
 * @param request DescribeFabricCandidateOrganizationsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricCandidateOrganizationsResponse
 */
async function describeFabricCandidateOrganizationsWithOptions(request: DescribeFabricCandidateOrganizationsRequest, runtime: Util.RuntimeOptions): DescribeFabricCandidateOrganizationsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFabricCandidateOrganizations',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeFabricCandidateOrganizationsRequest
 * @return DescribeFabricCandidateOrganizationsResponse
 */
async function describeFabricCandidateOrganizations(request: DescribeFabricCandidateOrganizationsRequest): DescribeFabricCandidateOrganizationsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricCandidateOrganizationsWithOptions(request, runtime);
}

model DescribeFabricChaincodeDefinitionTaskRequest {
  chaincodeId?: string(name='ChaincodeId', description='This parameter is required.', example='code-sacc-jbkuldd3i7ad'),
  organizationId?: string(name='OrganizationId', description='This parameter is required.', example='peers-aaaaaa2-1eqnj5o5w9dt3'),
}

model DescribeFabricChaincodeDefinitionTaskResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: {
    approvers?: [ string ](name='Approvers'),
    channelName?: string(name='ChannelName', example='f100'),
    content?: {
      chaincodeDefinition?: {
        chaincodePackageId?: string(name='ChaincodePackageId', example='sacc_v1.0:698d4e73c5f1d0239fbf0313ac79ddfaf44d5a803ecb02a4d1983cca4a706860'),
        collectionConfig?: string(name='CollectionConfig', example='collectionconfig'),
        endorsementPolicy?: string(name='EndorsementPolicy', example='OR ("perf9141MSP.member")'),
        initRequired?: boolean(name='InitRequired', example='true'),
        name?: string(name='Name', example='sacc'),
        sequence?: long(name='Sequence', example='1'),
        uid?: string(name='Uid', example='698d4e73c5f1d0239fbf0313ac79ddfaf44d5a803ecb02a4d1983cca4a706860'),
        version?: string(name='Version', example='1.1'),
      }(name='ChaincodeDefinition'),
    }(name='Content'),
    createTime?: long(name='CreateTime', example='1533025590'),
    creator?: string(name='Creator', example='perf9141MSP'),
    description?: string(name='Description', example='description'),
    status?: string(name='Status', example='Pending'),
    taskId?: string(name='TaskId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
    type?: string(name='Type', example='ChaincodeDefinition'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricChaincodeDefinitionTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricChaincodeDefinitionTaskResponseBody(name='body'),
}

/**
 * @summary DescribeFabricChaincodeDefinitionTask
 *
 * @param request DescribeFabricChaincodeDefinitionTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricChaincodeDefinitionTaskResponse
 */
async function describeFabricChaincodeDefinitionTaskWithOptions(request: DescribeFabricChaincodeDefinitionTaskRequest, runtime: Util.RuntimeOptions): DescribeFabricChaincodeDefinitionTaskResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.chaincodeId)) {
    body['ChaincodeId'] = request.chaincodeId;
  }
  if (!Util.isUnset(request.organizationId)) {
    body['OrganizationId'] = request.organizationId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFabricChaincodeDefinitionTask',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary DescribeFabricChaincodeDefinitionTask
 *
 * @param request DescribeFabricChaincodeDefinitionTaskRequest
 * @return DescribeFabricChaincodeDefinitionTaskResponse
 */
async function describeFabricChaincodeDefinitionTask(request: DescribeFabricChaincodeDefinitionTaskRequest): DescribeFabricChaincodeDefinitionTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricChaincodeDefinitionTaskWithOptions(request, runtime);
}

model DescribeFabricChaincodeUploadPolicyRequest {
  organizationId?: string(name='OrganizationId', description='This parameter is required.', example='peers-aaaaaa1-1oxw31d04****'),
}

model DescribeFabricChaincodeUploadPolicyResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: {
    accessId?: string(name='AccessId', example='accessId'),
    dir?: string(name='Dir', example='test3/4bd1de21-2fff-4405-a8e9-f864c4bee24f'),
    expire?: int32(name='Expire', example='1533025590'),
    host?: string(name='Host', example='https://chaincode.oss-cn-beijing.aliyuncs.com'),
    policy?: string(name='Policy', example='eyJleHBpcmF0aW9uIjoiMjAxOC0wNy0zMVQwODoyNjozMC40NzdaIiwiY29uZGl'),
    signature?: string(name='Signature', example='signature'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricChaincodeUploadPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricChaincodeUploadPolicyResponseBody(name='body'),
}

/**
 * @param request DescribeFabricChaincodeUploadPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricChaincodeUploadPolicyResponse
 */
async function describeFabricChaincodeUploadPolicyWithOptions(request: DescribeFabricChaincodeUploadPolicyRequest, runtime: Util.RuntimeOptions): DescribeFabricChaincodeUploadPolicyResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.organizationId)) {
    body['OrganizationId'] = request.organizationId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFabricChaincodeUploadPolicy',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeFabricChaincodeUploadPolicyRequest
 * @return DescribeFabricChaincodeUploadPolicyResponse
 */
async function describeFabricChaincodeUploadPolicy(request: DescribeFabricChaincodeUploadPolicyRequest): DescribeFabricChaincodeUploadPolicyResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricChaincodeUploadPolicyWithOptions(request, runtime);
}

model DescribeFabricChannelMembersRequest {
  channelId?: string(name='ChannelId', description='This parameter is required.', example='chan-channelx-1l1hmckuu****'),
}

model DescribeFabricChannelMembersResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: [ 
    {
      acceptTime?: string(name='AcceptTime', example='1544411108000'),
      channelId?: string(name='ChannelId', example='chan-channelx-1l1hmckuuisxo'),
      inviteTime?: string(name='InviteTime', example='1544411108000'),
      organizationDescription?: string(name='OrganizationDescription', example='description'),
      organizationDomain?: string(name='OrganizationDomain', example='hello'),
      organizationId?: string(name='OrganizationId', example='peers-aaaaaa1-1oxw31d046jtl'),
      organizationName?: string(name='OrganizationName', example='name'),
      state?: string(name='State', example='Running'),
      withPeer?: boolean(name='WithPeer', example='true'),
    }
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricChannelMembersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricChannelMembersResponseBody(name='body'),
}

/**
 * @param request DescribeFabricChannelMembersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricChannelMembersResponse
 */
async function describeFabricChannelMembersWithOptions(request: DescribeFabricChannelMembersRequest, runtime: Util.RuntimeOptions): DescribeFabricChannelMembersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFabricChannelMembers',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeFabricChannelMembersRequest
 * @return DescribeFabricChannelMembersResponse
 */
async function describeFabricChannelMembers(request: DescribeFabricChannelMembersRequest): DescribeFabricChannelMembersResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricChannelMembersWithOptions(request, runtime);
}

model DescribeFabricConsortiumAdminStatusRequest {
  location?: string(name='Location', example='cn-hangzhou'),
}

model DescribeFabricConsortiumAdminStatusResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: [ 
    {
      consortiumAdministrator?: boolean(name='ConsortiumAdministrator', example='true'),
      consortiumId?: string(name='ConsortiumId', example='consortium-lianmenyumingyi-hc5d1bwlulg7'),
    }
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricConsortiumAdminStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricConsortiumAdminStatusResponseBody(name='body'),
}

/**
 * @param request DescribeFabricConsortiumAdminStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricConsortiumAdminStatusResponse
 */
async function describeFabricConsortiumAdminStatusWithOptions(request: DescribeFabricConsortiumAdminStatusRequest, runtime: Util.RuntimeOptions): DescribeFabricConsortiumAdminStatusResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFabricConsortiumAdminStatus',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeFabricConsortiumAdminStatusRequest
 * @return DescribeFabricConsortiumAdminStatusResponse
 */
async function describeFabricConsortiumAdminStatus(request: DescribeFabricConsortiumAdminStatusRequest): DescribeFabricConsortiumAdminStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricConsortiumAdminStatusWithOptions(request, runtime);
}

model DescribeFabricConsortiumChaincodesRequest {
  consortiumId?: string(name='ConsortiumId', description='This parameter is required.', example='consortium-lianmenyumingyi-hc5d1bwlulg7'),
  location?: string(name='Location', example='cn-hangzhou'),
}

model DescribeFabricConsortiumChaincodesResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: [ 
    {
      chaincodeId?: string(name='ChaincodeId', example='code-sacc-1pr09q7jmo0np'),
      chaincodeName?: string(name='ChaincodeName', example='sacc'),
      chaincodeVersion?: string(name='ChaincodeVersion', example='1.0'),
      channelId?: string(name='ChannelId', example='chan-channelx-1l1hmckuuisxo'),
      channelName?: string(name='ChannelName', example='cname'),
      consortiumId?: string(name='ConsortiumId', example='consortium-lianmenyumingyi-hc5d1bwlulg7'),
      createTime?: string(name='CreateTime', example='1544411108000'),
      deployTime?: string(name='DeployTime', example='1544411108000'),
      endorsePolicy?: string(name='EndorsePolicy', example='OR (\\\\"aaaaaa1MSP.peer\\\\")'),
      input?: string(name='Input', example='input'),
      install?: boolean(name='Install', example='true'),
      message?: string(name='Message', example='ok'),
      path?: string(name='Path', example='go-sdk-demo/chaincode/src'),
      providerId?: string(name='ProviderId', example='peers-aaaaaa2-1eqnj5o5w9dt3'),
      providerName?: string(name='ProviderName', example='name'),
      state?: string(name='State', example='Instantiatable'),
      type?: int32(name='Type', example='1'),
    }
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricConsortiumChaincodesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricConsortiumChaincodesResponseBody(name='body'),
}

/**
 * @param request DescribeFabricConsortiumChaincodesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricConsortiumChaincodesResponse
 */
async function describeFabricConsortiumChaincodesWithOptions(request: DescribeFabricConsortiumChaincodesRequest, runtime: Util.RuntimeOptions): DescribeFabricConsortiumChaincodesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFabricConsortiumChaincodes',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeFabricConsortiumChaincodesRequest
 * @return DescribeFabricConsortiumChaincodesResponse
 */
async function describeFabricConsortiumChaincodes(request: DescribeFabricConsortiumChaincodesRequest): DescribeFabricConsortiumChaincodesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricConsortiumChaincodesWithOptions(request, runtime);
}

model DescribeFabricConsortiumChannelsRequest {
  consortiumId?: string(name='ConsortiumId', description='This parameter is required.', example='consortium-lianmenyumingyi-hc5d1bwlulg7'),
  location?: string(name='Location', example='cn-hangzhou'),
}

model DescribeFabricConsortiumChannelsResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: [ 
    {
      batchTimeout?: int32(name='BatchTimeout', example='2'),
      blockCount?: int32(name='BlockCount', example='2'),
      chaincodeCount?: int32(name='ChaincodeCount', example='2'),
      channelId?: string(name='ChannelId', example='chan-channelx-1l1hmckuuisxo'),
      channelName?: string(name='ChannelName', example='mychammel'),
      consortiumChannelId?: int32(name='ConsortiumChannelId', example='1'),
      consortiumId?: string(name='ConsortiumId', example='consortium-lianmenyumingyi-hc5d1bwlulg7'),
      consortiumName?: string(name='ConsortiumName', example='name'),
      createTime?: string(name='CreateTime', example='1544411108000'),
      deleteTime?: string(name='DeleteTime', example='1544411108000'),
      deleted?: boolean(name='Deleted', example='true'),
      maxMessageCount?: int32(name='MaxMessageCount', example='200'),
      memberCount?: int32(name='MemberCount', example='3'),
      memberJoinedCount?: string(name='MemberJoinedCount', example='3'),
      needJoined?: boolean(name='NeedJoined', example='true'),
      ownerBid?: string(name='OwnerBid', example='26842'),
      ownerName?: string(name='OwnerName', example='uid-*'),
      ownerUid?: long(name='OwnerUid', example='212'),
      preferredMaxBytes?: int32(name='PreferredMaxBytes', example='102410241'),
      requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
      state?: string(name='State', example='Running'),
      supportChannelConfig?: boolean(name='SupportChannelConfig', example='true'),
      updateTime?: string(name='UpdateTime', example='1544411108000'),
    }
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricConsortiumChannelsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricConsortiumChannelsResponseBody(name='body'),
}

/**
 * @param request DescribeFabricConsortiumChannelsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricConsortiumChannelsResponse
 */
async function describeFabricConsortiumChannelsWithOptions(request: DescribeFabricConsortiumChannelsRequest, runtime: Util.RuntimeOptions): DescribeFabricConsortiumChannelsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.consortiumId)) {
    query['ConsortiumId'] = request.consortiumId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFabricConsortiumChannels',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeFabricConsortiumChannelsRequest
 * @return DescribeFabricConsortiumChannelsResponse
 */
async function describeFabricConsortiumChannels(request: DescribeFabricConsortiumChannelsRequest): DescribeFabricConsortiumChannelsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricConsortiumChannelsWithOptions(request, runtime);
}

model DescribeFabricConsortiumConfigResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: {
    channelPolicy?: [ string ](name='ChannelPolicy'),
    ordererType?: [ string ](name='OrdererType'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricConsortiumConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricConsortiumConfigResponseBody(name='body'),
}

/**
 * @param request DescribeFabricConsortiumConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricConsortiumConfigResponse
 */
async function describeFabricConsortiumConfigWithOptions(runtime: Util.RuntimeOptions): DescribeFabricConsortiumConfigResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'DescribeFabricConsortiumConfig',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @return DescribeFabricConsortiumConfigResponse
 */
async function describeFabricConsortiumConfig(): DescribeFabricConsortiumConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricConsortiumConfigWithOptions(runtime);
}

model DescribeFabricConsortiumDeletableRequest {
  consortiumId?: string(name='ConsortiumId', description='This parameter is required.', example='consortium-lianmenyumingyi-hc5d1bwl****'),
  location?: string(name='Location', example='cn-hangzhou'),
}

model DescribeFabricConsortiumDeletableResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: {
    codeName?: string(name='CodeName', example='codename'),
    consortiumId?: string(name='ConsortiumId', example='consortium-lianmenyumingyi-hc5d1bwlulg7'),
    consortiumName?: string(name='ConsortiumName', example='myconsortium'),
    deletable?: boolean(name='Deletable', example='true'),
    description?: string(name='Description', example='description'),
    domain?: string(name='Domain', example='domain'),
    regionId?: string(name='RegionId', example='cn-hangzhou'),
    state?: string(name='State', example='Running'),
    zoneId?: string(name='ZoneId', example='cn-hangzhou'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricConsortiumDeletableResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricConsortiumDeletableResponseBody(name='body'),
}

/**
 * @param request DescribeFabricConsortiumDeletableRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricConsortiumDeletableResponse
 */
async function describeFabricConsortiumDeletableWithOptions(request: DescribeFabricConsortiumDeletableRequest, runtime: Util.RuntimeOptions): DescribeFabricConsortiumDeletableResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.consortiumId)) {
    query['ConsortiumId'] = request.consortiumId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFabricConsortiumDeletable',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeFabricConsortiumDeletableRequest
 * @return DescribeFabricConsortiumDeletableResponse
 */
async function describeFabricConsortiumDeletable(request: DescribeFabricConsortiumDeletableRequest): DescribeFabricConsortiumDeletableResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricConsortiumDeletableWithOptions(request, runtime);
}

model DescribeFabricConsortiumMemberApprovalRequest {
  consortiumId?: string(name='ConsortiumId', description='This parameter is required.', example='consortium-lianmenyumingyi-hc5d1bwlulg7'),
  location?: string(name='Location', example='cn-hangzhou'),
}

model DescribeFabricConsortiumMemberApprovalResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: [ 
    {
      channelCreatePolicy?: string(name='ChannelCreatePolicy', example='Any'),
      confirmTime?: string(name='ConfirmTime', example='1544411108000'),
      consortiumId?: string(name='ConsortiumId', example='consortium-lianmenyumingyi-hc5d1bwlulg7'),
      consortiumName?: string(name='ConsortiumName', example='name'),
      domainName?: string(name='DomainName', example='domain'),
      organizationId?: string(name='OrganizationId', example='peers-aaaaaa2-1eqnj5o5w9dt3'),
      organizationName?: string(name='OrganizationName', example='orgname'),
      state?: string(name='State', example='Running'),
    }
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricConsortiumMemberApprovalResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricConsortiumMemberApprovalResponseBody(name='body'),
}

/**
 * @param request DescribeFabricConsortiumMemberApprovalRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricConsortiumMemberApprovalResponse
 */
async function describeFabricConsortiumMemberApprovalWithOptions(request: DescribeFabricConsortiumMemberApprovalRequest, runtime: Util.RuntimeOptions): DescribeFabricConsortiumMemberApprovalResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.consortiumId)) {
    query['ConsortiumId'] = request.consortiumId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFabricConsortiumMemberApproval',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeFabricConsortiumMemberApprovalRequest
 * @return DescribeFabricConsortiumMemberApprovalResponse
 */
async function describeFabricConsortiumMemberApproval(request: DescribeFabricConsortiumMemberApprovalRequest): DescribeFabricConsortiumMemberApprovalResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricConsortiumMemberApprovalWithOptions(request, runtime);
}

model DescribeFabricConsortiumMembersRequest {
  consortiumId?: string(name='ConsortiumId', description='This parameter is required.', example='consortium-lianmenyumingyi-hc5d1bwl****'),
  location?: string(name='Location', example='cn-hangzhou'),
}

model DescribeFabricConsortiumMembersResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: [ 
    {
      consortiumId?: string(name='ConsortiumId', example='consortium-lianmenyumingyi-hc5d1bwlulg7'),
      description?: string(name='Description', example='description'),
      domain?: string(name='Domain', example='domain'),
      joinedTime?: string(name='JoinedTime', example='1544411108000'),
      organizationId?: string(name='OrganizationId', example='peers-aaaaaa2-1eqnj5o5w9dt3'),
      organizationName?: string(name='OrganizationName', example='name'),
    }
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricConsortiumMembersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricConsortiumMembersResponseBody(name='body'),
}

/**
 * @param request DescribeFabricConsortiumMembersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricConsortiumMembersResponse
 */
async function describeFabricConsortiumMembersWithOptions(request: DescribeFabricConsortiumMembersRequest, runtime: Util.RuntimeOptions): DescribeFabricConsortiumMembersResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFabricConsortiumMembers',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeFabricConsortiumMembersRequest
 * @return DescribeFabricConsortiumMembersResponse
 */
async function describeFabricConsortiumMembers(request: DescribeFabricConsortiumMembersRequest): DescribeFabricConsortiumMembersResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricConsortiumMembersWithOptions(request, runtime);
}

model DescribeFabricConsortiumOrderersRequest {
  consortiumId?: string(name='ConsortiumId', description='This parameter is required.', example='consortium-aaaaaa-akpcsjjac2jd'),
  location?: string(name='Location', example='cn-hangzhou'),
}

model DescribeFabricConsortiumOrderersResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: [ 
    {
      createTime?: string(name='CreateTime', example='1544411108000'),
      domain?: string(name='Domain', example='domain'),
      instanceType?: string(name='InstanceType', example='ecs.n1.small'),
      ordererName?: string(name='OrdererName', example='order1'),
      port?: int32(name='Port', example='7050'),
      updateTime?: string(name='UpdateTime', example='1544411108000'),
    }
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricConsortiumOrderersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricConsortiumOrderersResponseBody(name='body'),
}

/**
 * @param request DescribeFabricConsortiumOrderersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricConsortiumOrderersResponse
 */
async function describeFabricConsortiumOrderersWithOptions(request: DescribeFabricConsortiumOrderersRequest, runtime: Util.RuntimeOptions): DescribeFabricConsortiumOrderersResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFabricConsortiumOrderers',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeFabricConsortiumOrderersRequest
 * @return DescribeFabricConsortiumOrderersResponse
 */
async function describeFabricConsortiumOrderers(request: DescribeFabricConsortiumOrderersRequest): DescribeFabricConsortiumOrderersResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricConsortiumOrderersWithOptions(request, runtime);
}

model DescribeFabricConsortiumSpecsResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: [ 
    {
      enable?: boolean(name='Enable', example='true'),
      specName?: string(name='SpecName', example='basic'),
      specTitle?: string(name='SpecTitle'),
    }
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricConsortiumSpecsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricConsortiumSpecsResponseBody(name='body'),
}

/**
 * @param request DescribeFabricConsortiumSpecsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricConsortiumSpecsResponse
 */
async function describeFabricConsortiumSpecsWithOptions(runtime: Util.RuntimeOptions): DescribeFabricConsortiumSpecsResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'DescribeFabricConsortiumSpecs',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @return DescribeFabricConsortiumSpecsResponse
 */
async function describeFabricConsortiumSpecs(): DescribeFabricConsortiumSpecsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricConsortiumSpecsWithOptions(runtime);
}

model DescribeFabricConsortiumsRequest {
  consortiumId?: string(name='ConsortiumId', example='consortium-lianmenyumingyi-hc5d1bwl****'),
  location?: string(name='Location', example='cn-hangzhou'),
  tag?: [ 
    {
      key?: string(name='Key', description='This parameter is required.', example='key1'),
      value?: string(name='Value', example='value1'),
    }
  ](name='Tag'),
}

model DescribeFabricConsortiumsResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: [ 
    {
      channelCount?: int32(name='ChannelCount', example='2'),
      channelPolicy?: string(name='ChannelPolicy', example='Any'),
      codeName?: string(name='CodeName', example='code'),
      consortiumId?: string(name='ConsortiumId', example='consortium-lianmenyumingyi-hc5d1bwl****'),
      consortiumName?: string(name='ConsortiumName', example='name'),
      createTime?: string(name='CreateTime', example='1544411108000'),
      domain?: string(name='Domain', example='domain'),
      expiredTime?: string(name='ExpiredTime', example='1544411108000'),
      majorVersion?: string(name='MajorVersion'),
      organizationCount?: int32(name='OrganizationCount', example='2'),
      ownerBid?: string(name='OwnerBid', example='26842'),
      ownerName?: string(name='OwnerName', example='uid-125566'),
      ownerUid?: long(name='OwnerUid', example='12042815'),
      regionId?: string(name='RegionId', example='cn-hangzhou'),
      requestId?: string(name='RequestId', example='3A929FAC-A82D-4EAB-A0FF-D867426D8B23'),
      specName?: string(name='SpecName', example='basic'),
      state?: string(name='State', example='Pending'),
      supportChannelConfig?: boolean(name='SupportChannelConfig', example='true'),
      tags?: [ 
        {
          key?: string(name='Key', example='app'),
          value?: string(name='Value', example='nat_internet'),
        }
      ](name='Tags'),
    }
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricConsortiumsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricConsortiumsResponseBody(name='body'),
}

/**
 * @param request DescribeFabricConsortiumsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricConsortiumsResponse
 */
async function describeFabricConsortiumsWithOptions(request: DescribeFabricConsortiumsRequest, runtime: Util.RuntimeOptions): DescribeFabricConsortiumsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.consortiumId)) {
    query['ConsortiumId'] = request.consortiumId;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFabricConsortiums',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeFabricConsortiumsRequest
 * @return DescribeFabricConsortiumsResponse
 */
async function describeFabricConsortiums(request: DescribeFabricConsortiumsRequest): DescribeFabricConsortiumsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricConsortiumsWithOptions(request, runtime);
}

model DescribeFabricExplorerRequest {
  exBody?: string(name='ExBody', example='{}'),
  exMethod?: string(name='ExMethod', description='This parameter is required.', example='GET'),
  exUrl?: string(name='ExUrl', description='This parameter is required.', example='/api/v1/channel'),
  organizationId?: string(name='OrganizationId', description='This parameter is required.', example='peers-test11-tzwny25vqicq'),
}

model DescribeFabricExplorerResponseBody = {
  dynamicCode?: string(name='DynamicCode', example='ExplorerException'),
  dynamicMessage?: string(name='DynamicMessage', example='An error in the monitoring service has occurred.'),
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='19E91C1D-9BD0-468F-A7DA-915263C6689F'),
  result?: string(name='Result', example='{}'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricExplorerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricExplorerResponseBody(name='body'),
}

/**
 * @param request DescribeFabricExplorerRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricExplorerResponse
 */
async function describeFabricExplorerWithOptions(request: DescribeFabricExplorerRequest, runtime: Util.RuntimeOptions): DescribeFabricExplorerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.exBody)) {
    query['ExBody'] = request.exBody;
  }
  if (!Util.isUnset(request.exMethod)) {
    query['ExMethod'] = request.exMethod;
  }
  if (!Util.isUnset(request.exUrl)) {
    query['ExUrl'] = request.exUrl;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.organizationId)) {
    body['OrganizationId'] = request.organizationId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFabricExplorer',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeFabricExplorerRequest
 * @return DescribeFabricExplorerResponse
 */
async function describeFabricExplorer(request: DescribeFabricExplorerRequest): DescribeFabricExplorerResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricExplorerWithOptions(request, runtime);
}

model DescribeFabricInvitationCodeRequest {
  consortiumId?: string(name='ConsortiumId', description='This parameter is required.', example='consortium-lianmenyumingyi-hc5d1bwl****'),
}

model DescribeFabricInvitationCodeResponseBody = {
  dynamicCode?: string(name='DynamicCode', example='InvitationCodeNotFound'),
  dynamicMessage?: string(name='DynamicMessage', example='The invitation code could not found.'),
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='77E25463-56CB-4F1C-8EB6-8ADDFE39EF0F'),
  result?: {
    accepted?: boolean(name='Accepted', example='true'),
    code?: string(name='Code', example='code'),
    consortiumId?: string(name='ConsortiumId', example='consortium-lianmenyumingyi-hc5d1bwlulg7'),
    email?: string(name='Email', example='abc@126.com'),
    expireTime?: string(name='ExpireTime', example='1544411108000'),
    invitationId?: int32(name='InvitationId', example='2'),
    sendTime?: string(name='SendTime', example='1544411108000'),
    senderBid?: string(name='SenderBid', example='27534'),
    senderId?: long(name='SenderId', example='26345345'),
    senderName?: string(name='SenderName', example='uid-35324'),
    url?: string(name='Url', example='http://baas.console.aliyun.test/invite?code=92e7ef1934892'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricInvitationCodeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricInvitationCodeResponseBody(name='body'),
}

/**
 * @param request DescribeFabricInvitationCodeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricInvitationCodeResponse
 */
async function describeFabricInvitationCodeWithOptions(request: DescribeFabricInvitationCodeRequest, runtime: Util.RuntimeOptions): DescribeFabricInvitationCodeResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFabricInvitationCode',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeFabricInvitationCodeRequest
 * @return DescribeFabricInvitationCodeResponse
 */
async function describeFabricInvitationCode(request: DescribeFabricInvitationCodeRequest): DescribeFabricInvitationCodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricInvitationCodeWithOptions(request, runtime);
}

model DescribeFabricInviterRequest {
  code?: string(name='Code', description='This parameter is required.', example='200'),
}

model DescribeFabricInviterResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='C445762C-8909-4BD8-A2BD-BB45BF2441D8'),
  result?: {
    consortiumId?: string(name='ConsortiumId', example='consortium-lianmenyumingyi-hc5d1bwl****'),
    consortiumName?: string(name='ConsortiumName', example='name'),
    expireTime?: string(name='ExpireTime', example='1544411108000'),
    inviterId?: long(name='InviterId', example='3524234'),
    inviterName?: string(name='InviterName', example='name'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricInviterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricInviterResponseBody(name='body'),
}

/**
 * @param request DescribeFabricInviterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricInviterResponse
 */
async function describeFabricInviterWithOptions(request: DescribeFabricInviterRequest, runtime: Util.RuntimeOptions): DescribeFabricInviterResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.code)) {
    body['Code'] = request.code;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFabricInviter',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeFabricInviterRequest
 * @return DescribeFabricInviterResponse
 */
async function describeFabricInviter(request: DescribeFabricInviterRequest): DescribeFabricInviterResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricInviterWithOptions(request, runtime);
}

model DescribeFabricOrdererLogsRequest {
  consortiumId?: string(name='ConsortiumId', description='This parameter is required.', example='consortium-test-iyuso3g773ki'),
  lines?: string(name='Lines', example='50'),
  ordererName?: string(name='OrdererName', description='This parameter is required.', example='orderer1'),
}

model DescribeFabricOrdererLogsResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='508EA949-6349-4C86-B8E7-1D90669382B1'),
  result?: string(name='Result', example='Kafka.Retry.Producer.RetryMax=3'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricOrdererLogsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricOrdererLogsResponseBody(name='body'),
}

/**
 * @param request DescribeFabricOrdererLogsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricOrdererLogsResponse
 */
async function describeFabricOrdererLogsWithOptions(request: DescribeFabricOrdererLogsRequest, runtime: Util.RuntimeOptions): DescribeFabricOrdererLogsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.consortiumId)) {
    query['ConsortiumId'] = request.consortiumId;
  }
  if (!Util.isUnset(request.lines)) {
    query['Lines'] = request.lines;
  }
  if (!Util.isUnset(request.ordererName)) {
    query['OrdererName'] = request.ordererName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFabricOrdererLogs',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeFabricOrdererLogsRequest
 * @return DescribeFabricOrdererLogsResponse
 */
async function describeFabricOrdererLogs(request: DescribeFabricOrdererLogsRequest): DescribeFabricOrdererLogsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricOrdererLogsWithOptions(request, runtime);
}

model DescribeFabricOrganizationRequest {
  location?: string(name='Location', example='cn-hangzhou'),
  organizationId?: string(name='OrganizationId', description='This parameter is required.', example='peers-aaaaaa2-1eqnj5o5w****'),
  tag?: [ 
    {
      key?: string(name='Key', description='This parameter is required.', example='key1'),
      value?: string(name='Value', example='value1'),
    }
  ](name='Tag'),
}

model DescribeFabricOrganizationResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: {
    CANAME?: string(name='CANAME', example='client'),
    CAUrl?: string(name='CAUrl', example='https://ca1.org1.alibabacloudbaas.com:31154'),
    codeName?: string(name='CodeName', example='org1'),
    consortiumCount?: int32(name='ConsortiumCount', example='2'),
    createTime?: string(name='CreateTime', example='1533025590'),
    domain?: string(name='Domain', example='org1.alibabacloudbaas.com'),
    MSP?: string(name='MSP', example='org1MSP'),
    organizationDescription?: string(name='OrganizationDescription', example='This is org1'),
    organizationId?: string(name='OrganizationId', example='peers-aaaaaa2-1eqnj5o5w9dt3'),
    organizationName?: string(name='OrganizationName', example='org1'),
    ownerBid?: string(name='OwnerBid', example='2544'),
    ownerName?: string(name='OwnerName', example='uid-23434'),
    ownerUid?: long(name='OwnerUid', example='23434'),
    peerCount?: int32(name='PeerCount', example='2'),
    regionId?: string(name='RegionId', example='cn-hangzhou'),
    requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
    specName?: string(name='SpecName', example='basic'),
    state?: string(name='State', example='Running'),
    tags?: [ 
      {
        key?: string(name='Key', example='BlockChainOwner'),
        value?: string(name='Value', example='DepartmentA'),
      }
    ](name='Tags'),
    userCount?: int32(name='UserCount', example='2'),
    zoneId?: string(name='ZoneId', example='cn-hangzhou-1a'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricOrganizationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricOrganizationResponseBody(name='body'),
}

/**
 * @param request DescribeFabricOrganizationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricOrganizationResponse
 */
async function describeFabricOrganizationWithOptions(request: DescribeFabricOrganizationRequest, runtime: Util.RuntimeOptions): DescribeFabricOrganizationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.organizationId)) {
    query['OrganizationId'] = request.organizationId;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFabricOrganization',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeFabricOrganizationRequest
 * @return DescribeFabricOrganizationResponse
 */
async function describeFabricOrganization(request: DescribeFabricOrganizationRequest): DescribeFabricOrganizationResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricOrganizationWithOptions(request, runtime);
}

model DescribeFabricOrganizationChaincodePackageRequest {
  organizationId?: string(name='OrganizationId', description='This parameter is required.', example='peers-aaaaaa2-1eqnj5o5w9dt3'),
}

model DescribeFabricOrganizationChaincodePackageResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  message?: string(name='Message', example='ok'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: [
    ChaincodePackage
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricOrganizationChaincodePackageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricOrganizationChaincodePackageResponseBody(name='body'),
}

/**
 * @summary DescribeFabricOrganizationChaincodePackage
 *
 * @param request DescribeFabricOrganizationChaincodePackageRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricOrganizationChaincodePackageResponse
 */
async function describeFabricOrganizationChaincodePackageWithOptions(request: DescribeFabricOrganizationChaincodePackageRequest, runtime: Util.RuntimeOptions): DescribeFabricOrganizationChaincodePackageResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.organizationId)) {
    body['OrganizationId'] = request.organizationId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFabricOrganizationChaincodePackage',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary DescribeFabricOrganizationChaincodePackage
 *
 * @param request DescribeFabricOrganizationChaincodePackageRequest
 * @return DescribeFabricOrganizationChaincodePackageResponse
 */
async function describeFabricOrganizationChaincodePackage(request: DescribeFabricOrganizationChaincodePackageRequest): DescribeFabricOrganizationChaincodePackageResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricOrganizationChaincodePackageWithOptions(request, runtime);
}

model DescribeFabricOrganizationChaincodesRequest {
  location?: string(name='Location', example='cn-hangzhou'),
  organizationId?: string(name='OrganizationId', description='This parameter is required.', example='peers-aaaaaa2-1eqnj5o5w****'),
}

model DescribeFabricOrganizationChaincodesResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: [ 
    {
      chaincodeId?: string(name='ChaincodeId', example='code-sacc-1pr09q7jmo0np'),
      chaincodeName?: string(name='ChaincodeName', example='mycc'),
      chaincodeVersion?: string(name='ChaincodeVersion', example='0.3'),
      channelId?: string(name='ChannelId', example='chan-first-channel-31hlgpen5k5lig'),
      channelName?: string(name='ChannelName', example='first-channel'),
      consortiumId?: string(name='ConsortiumId', example='consortium-lianmenyumingyi-hc5d1bwlulg7'),
      createTime?: string(name='CreateTime', example='1533025590'),
      creator?: string(name='Creator', example='uid-23425'),
      deployTime?: string(name='DeployTime', example='1533025590'),
      endorsePolicy?: string(name='EndorsePolicy', example='OR (&#39;perf9141MSP.member&#39;)'),
      installed?: string(name='Installed', example='Installed'),
      message?: string(name='Message', example='OK'),
      state?: string(name='State', example='RUNNING'),
    }
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricOrganizationChaincodesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricOrganizationChaincodesResponseBody(name='body'),
}

/**
 * @param request DescribeFabricOrganizationChaincodesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricOrganizationChaincodesResponse
 */
async function describeFabricOrganizationChaincodesWithOptions(request: DescribeFabricOrganizationChaincodesRequest, runtime: Util.RuntimeOptions): DescribeFabricOrganizationChaincodesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  if (!Util.isUnset(request.organizationId)) {
    body['OrganizationId'] = request.organizationId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFabricOrganizationChaincodes',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeFabricOrganizationChaincodesRequest
 * @return DescribeFabricOrganizationChaincodesResponse
 */
async function describeFabricOrganizationChaincodes(request: DescribeFabricOrganizationChaincodesRequest): DescribeFabricOrganizationChaincodesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricOrganizationChaincodesWithOptions(request, runtime);
}

model DescribeFabricOrganizationChannelsRequest {
  location?: string(name='Location', example='cn-hangzhou'),
  organizationId?: string(name='OrganizationId', description='This parameter is required.', example='peers-aaaaaa2-1eqnj5o5****'),
}

model DescribeFabricOrganizationChannelsResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: [ 
    {
      batchTimeout?: int32(name='BatchTimeout', example='2'),
      blockCount?: int32(name='BlockCount', example='3'),
      chaincodeCount?: int32(name='ChaincodeCount', example='2'),
      channelId?: string(name='ChannelId'),
      channelName?: string(name='ChannelName', example='mychannel'),
      consortiumId?: string(name='ConsortiumId'),
      consortiumName?: string(name='ConsortiumName', example='name'),
      createTime?: string(name='CreateTime', example='1533025590'),
      deleteTime?: string(name='DeleteTime', example='1533025590'),
      deleted?: boolean(name='Deleted', example='true'),
      maxMessageCount?: int32(name='MaxMessageCount', example='12'),
      memberCount?: int32(name='MemberCount', example='3'),
      ownerBid?: string(name='OwnerBid'),
      ownerName?: string(name='OwnerName'),
      ownerUid?: long(name='OwnerUid'),
      preferredMaxBytes?: int32(name='PreferredMaxBytes', example='24'),
      requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
      state?: string(name='State', example='Running'),
      supportChannelConfig?: boolean(name='SupportChannelConfig', example='true'),
      updateTime?: string(name='UpdateTime', example='1533025590'),
    }
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricOrganizationChannelsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricOrganizationChannelsResponseBody(name='body'),
}

/**
 * @param request DescribeFabricOrganizationChannelsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricOrganizationChannelsResponse
 */
async function describeFabricOrganizationChannelsWithOptions(request: DescribeFabricOrganizationChannelsRequest, runtime: Util.RuntimeOptions): DescribeFabricOrganizationChannelsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.organizationId)) {
    query['OrganizationId'] = request.organizationId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFabricOrganizationChannels',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeFabricOrganizationChannelsRequest
 * @return DescribeFabricOrganizationChannelsResponse
 */
async function describeFabricOrganizationChannels(request: DescribeFabricOrganizationChannelsRequest): DescribeFabricOrganizationChannelsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricOrganizationChannelsWithOptions(request, runtime);
}

model DescribeFabricOrganizationDeletableRequest {
  location?: string(name='Location', example='cn-hangzhou'),
  organizationId?: string(name='OrganizationId', description='This parameter is required.', example='peers-aaaaaa2-1eqnj5o5w****'),
}

model DescribeFabricOrganizationDeletableResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: {
    codeName?: string(name='CodeName', example='name'),
    deletable?: boolean(name='Deletable', example='true'),
    domain?: string(name='Domain', example='domain'),
    organizationDescription?: string(name='OrganizationDescription', example='desc'),
    organizationId?: string(name='OrganizationId', example='peers-aaaaaa2-1eqnj5o5w****'),
    organizationName?: string(name='OrganizationName', example='orgname'),
    regionId?: string(name='RegionId', example='cn-hangzhou'),
    state?: string(name='State', example='Running'),
    zoneId?: string(name='ZoneId', example='zone'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricOrganizationDeletableResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricOrganizationDeletableResponseBody(name='body'),
}

/**
 * @param request DescribeFabricOrganizationDeletableRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricOrganizationDeletableResponse
 */
async function describeFabricOrganizationDeletableWithOptions(request: DescribeFabricOrganizationDeletableRequest, runtime: Util.RuntimeOptions): DescribeFabricOrganizationDeletableResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.organizationId)) {
    query['OrganizationId'] = request.organizationId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFabricOrganizationDeletable',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeFabricOrganizationDeletableRequest
 * @return DescribeFabricOrganizationDeletableResponse
 */
async function describeFabricOrganizationDeletable(request: DescribeFabricOrganizationDeletableRequest): DescribeFabricOrganizationDeletableResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricOrganizationDeletableWithOptions(request, runtime);
}

model DescribeFabricOrganizationMembersRequest {
  location?: string(name='Location', example='cn-hangzhou'),
  organizationId?: string(name='OrganizationId', description='This parameter is required.', example='peers-aaaaaa2-1eqnj5o5w****'),
}

model DescribeFabricOrganizationMembersResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: [ 
    {
      consortiumId?: string(name='ConsortiumId', example='consortium-lianmenyumingyi-hc5d1bwl****'),
      consortiumName?: string(name='ConsortiumName', example='name'),
      description?: string(name='Description', example='desc'),
      domain?: string(name='Domain', example='domain'),
      joinedTime?: string(name='JoinedTime', example='1533025590'),
      organizationId?: string(name='OrganizationId', example='peers-aaaaaa2-1eqnj5o5w****'),
      organizationName?: string(name='OrganizationName', example='name'),
      state?: string(name='State', example='Running'),
    }
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricOrganizationMembersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricOrganizationMembersResponseBody(name='body'),
}

/**
 * @param request DescribeFabricOrganizationMembersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricOrganizationMembersResponse
 */
async function describeFabricOrganizationMembersWithOptions(request: DescribeFabricOrganizationMembersRequest, runtime: Util.RuntimeOptions): DescribeFabricOrganizationMembersResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  if (!Util.isUnset(request.organizationId)) {
    body['OrganizationId'] = request.organizationId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFabricOrganizationMembers',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeFabricOrganizationMembersRequest
 * @return DescribeFabricOrganizationMembersResponse
 */
async function describeFabricOrganizationMembers(request: DescribeFabricOrganizationMembersRequest): DescribeFabricOrganizationMembersResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricOrganizationMembersWithOptions(request, runtime);
}

model DescribeFabricOrganizationPeersRequest {
  location?: string(name='Location', example='cn-hangzhou'),
  organizationId?: string(name='OrganizationId', description='This parameter is required.', example='peers-aaaaaa2-1eqnj5o5w****'),
}

model DescribeFabricOrganizationPeersResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: [ 
    {
      createTime?: string(name='CreateTime', example='1533025590'),
      domain?: string(name='Domain', example='domain'),
      instanceType?: string(name='InstanceType', example='basic'),
      internetIp?: string(name='InternetIp', example='10.0.0.2'),
      intranetIp?: string(name='IntranetIp', example='10.0.0.2'),
      isAnchor?: boolean(name='IsAnchor', example='false'),
      organizationPeerName?: string(name='OrganizationPeerName', example='name'),
      port?: int32(name='Port', example='1234'),
      updateTime?: string(name='UpdateTime', example='1533025590'),
    }
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricOrganizationPeersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricOrganizationPeersResponseBody(name='body'),
}

/**
 * @param request DescribeFabricOrganizationPeersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricOrganizationPeersResponse
 */
async function describeFabricOrganizationPeersWithOptions(request: DescribeFabricOrganizationPeersRequest, runtime: Util.RuntimeOptions): DescribeFabricOrganizationPeersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.organizationId)) {
    query['OrganizationId'] = request.organizationId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFabricOrganizationPeers',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeFabricOrganizationPeersRequest
 * @return DescribeFabricOrganizationPeersResponse
 */
async function describeFabricOrganizationPeers(request: DescribeFabricOrganizationPeersRequest): DescribeFabricOrganizationPeersResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricOrganizationPeersWithOptions(request, runtime);
}

model DescribeFabricOrganizationSpecsResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: [ 
    {
      enable?: boolean(name='Enable', example='true'),
      organizationSpecsName?: string(name='OrganizationSpecsName', example='basic'),
      title?: string(name='Title'),
    }
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricOrganizationSpecsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricOrganizationSpecsResponseBody(name='body'),
}

/**
 * @param request DescribeFabricOrganizationSpecsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricOrganizationSpecsResponse
 */
async function describeFabricOrganizationSpecsWithOptions(runtime: Util.RuntimeOptions): DescribeFabricOrganizationSpecsResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'DescribeFabricOrganizationSpecs',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @return DescribeFabricOrganizationSpecsResponse
 */
async function describeFabricOrganizationSpecs(): DescribeFabricOrganizationSpecsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricOrganizationSpecsWithOptions(runtime);
}

model DescribeFabricOrganizationUsersRequest {
  location?: string(name='Location', example='cn-hangzhou'),
  organizationId?: string(name='OrganizationId', description='This parameter is required.', example='peers-aaaaaa2-1eqnj5o5w****'),
}

model DescribeFabricOrganizationUsersResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: [ 
    {
      attrs?: string(name='Attrs', example='foo=foo1,bar=bar1'),
      callerBid?: string(name='CallerBid', example='26842'),
      callerUid?: long(name='CallerUid', example='84927598****'),
      createTime?: string(name='CreateTime', example='1533025590'),
      expireTime?: string(name='ExpireTime', example='1533025590'),
      fullName?: string(name='FullName', example='name'),
      organizationId?: string(name='OrganizationId', example='peers-aaaaaa2-1eqnj5o5w9dt3'),
      regionId?: string(name='RegionId', example='cn-hangzhou'),
      username?: string(name='Username', example='username'),
    }
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricOrganizationUsersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricOrganizationUsersResponseBody(name='body'),
}

/**
 * @param request DescribeFabricOrganizationUsersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricOrganizationUsersResponse
 */
async function describeFabricOrganizationUsersWithOptions(request: DescribeFabricOrganizationUsersRequest, runtime: Util.RuntimeOptions): DescribeFabricOrganizationUsersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.organizationId)) {
    query['OrganizationId'] = request.organizationId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFabricOrganizationUsers',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeFabricOrganizationUsersRequest
 * @return DescribeFabricOrganizationUsersResponse
 */
async function describeFabricOrganizationUsers(request: DescribeFabricOrganizationUsersRequest): DescribeFabricOrganizationUsersResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricOrganizationUsersWithOptions(request, runtime);
}

model DescribeFabricOrganizationsRequest {
  location?: string(name='Location', example='cn-hangzhou'),
  tag?: [ 
    {
      key?: string(name='Key', description='This parameter is required.', example='key1'),
      value?: string(name='Value', example='value1'),
    }
  ](name='Tag'),
}

model DescribeFabricOrganizationsResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: [ 
    {
      codeName?: string(name='CodeName', example='name'),
      consortiumCount?: int32(name='ConsortiumCount', example='2'),
      createTime?: string(name='CreateTime', example='1533025590'),
      domain?: string(name='Domain', example='domain'),
      majorVersion?: string(name='MajorVersion'),
      organizationDescription?: string(name='OrganizationDescription', example='desc'),
      organizationId?: string(name='OrganizationId', example='peers-aaaaaa2-1eqnj5o5w9dt3'),
      organizationName?: string(name='OrganizationName', example='name'),
      ownerBid?: string(name='OwnerBid', example='bid'),
      ownerName?: string(name='OwnerName', example='name'),
      ownerUid?: long(name='OwnerUid', example='1232'),
      peerCount?: int32(name='PeerCount', example='3'),
      regionId?: string(name='RegionId', example='cn-hangzhou'),
      requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
      specName?: string(name='SpecName', example='basic、'),
      state?: string(name='State', example='Running'),
      tags?: [ 
        {
          key?: string(name='Key', example='BlockChainOwner'),
          value?: string(name='Value', example='DepartmentA'),
        }
      ](name='Tags'),
      userCount?: int32(name='UserCount', example='10'),
      zoneId?: string(name='ZoneId', example='zone'),
    }
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricOrganizationsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricOrganizationsResponseBody(name='body'),
}

/**
 * @param request DescribeFabricOrganizationsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricOrganizationsResponse
 */
async function describeFabricOrganizationsWithOptions(request: DescribeFabricOrganizationsRequest, runtime: Util.RuntimeOptions): DescribeFabricOrganizationsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFabricOrganizations',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeFabricOrganizationsRequest
 * @return DescribeFabricOrganizationsResponse
 */
async function describeFabricOrganizations(request: DescribeFabricOrganizationsRequest): DescribeFabricOrganizationsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricOrganizationsWithOptions(request, runtime);
}

model DescribeFabricPeerLogsRequest {
  lines?: string(name='Lines', example='50'),
  organizationId?: string(name='OrganizationId', description='This parameter is required.', example='peers-test11-tzwny25vqicq'),
  peerName?: string(name='PeerName', description='This parameter is required.', example='peer1'),
}

model DescribeFabricPeerLogsResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='78A09CAF-4944-4CAE-B25D-F5B6BA27D9F5'),
  result?: string(name='Result', example='xxxx'),
  success?: boolean(name='Success', example='true'),
}

model DescribeFabricPeerLogsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFabricPeerLogsResponseBody(name='body'),
}

/**
 * @param request DescribeFabricPeerLogsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFabricPeerLogsResponse
 */
async function describeFabricPeerLogsWithOptions(request: DescribeFabricPeerLogsRequest, runtime: Util.RuntimeOptions): DescribeFabricPeerLogsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lines)) {
    query['Lines'] = request.lines;
  }
  if (!Util.isUnset(request.organizationId)) {
    query['OrganizationId'] = request.organizationId;
  }
  if (!Util.isUnset(request.peerName)) {
    query['PeerName'] = request.peerName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFabricPeerLogs',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeFabricPeerLogsRequest
 * @return DescribeFabricPeerLogsResponse
 */
async function describeFabricPeerLogs(request: DescribeFabricPeerLogsRequest): DescribeFabricPeerLogsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFabricPeerLogsWithOptions(request, runtime);
}

model DescribeRegionsRequest {
  acceptLanguage?: string(name='AcceptLanguage', example='zh-CN'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
}

model DescribeRegionsResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  regions?: [ 
    {
      localName?: string(name='LocalName'),
      regionEndpoint?: string(name='RegionEndpoint', example='baas.cn-hangzhou.aliyuncs.com'),
      regionId?: string(name='RegionId', example='cn-hangzhou'),
    }
  ](name='Regions'),
  requestId?: string(name='RequestId', example='D1597848-E708-522C-9275-3A202FC8B63A'),
  success?: boolean(name='Success', example='true'),
}

model DescribeRegionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRegionsResponseBody(name='body'),
}

/**
 * @param request DescribeRegionsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRegionsResponse
 */
async function describeRegionsWithOptions(request: DescribeRegionsRequest, runtime: Util.RuntimeOptions): DescribeRegionsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.acceptLanguage)) {
    query['AcceptLanguage'] = request.acceptLanguage;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRegions',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeRegionsRequest
 * @return DescribeRegionsResponse
 */
async function describeRegions(request: DescribeRegionsRequest): DescribeRegionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRegionsWithOptions(request, runtime);
}

model DescribeRootDomainResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: string(name='Result', example='onaliyunbaas.com'),
  success?: boolean(name='Success', example='true'),
}

model DescribeRootDomainResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRootDomainResponseBody(name='body'),
}

/**
 * @param request DescribeRootDomainRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRootDomainResponse
 */
async function describeRootDomainWithOptions(runtime: Util.RuntimeOptions): DescribeRootDomainResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'DescribeRootDomain',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @return DescribeRootDomainResponse
 */
async function describeRootDomain(): DescribeRootDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRootDomainWithOptions(runtime);
}

model DescribeTasksResponseBody = {
  dynamicCode?: string(name='DynamicCode', example='code'),
  dynamicMessage?: string(name='DynamicMessage', example='msg'),
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: [ 
    {
      action?: string(name='Action', example='action'),
      handled?: boolean(name='Handled', example='false'),
      operationType?: string(name='OperationType', example='type'),
      requestTime?: long(name='RequestTime', example='1533025590'),
      responseTime?: string(name='ResponseTime', example='1533025590'),
      result?: string(name='Result', example='result'),
      sender?: string(name='Sender', example='sender'),
      target?: string(name='Target', example='target'),
      taskId?: int32(name='TaskId', example='33'),
    }
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DescribeTasksResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeTasksResponseBody(name='body'),
}

/**
 * @param request DescribeTasksRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTasksResponse
 */
async function describeTasksWithOptions(runtime: Util.RuntimeOptions): DescribeTasksResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'DescribeTasks',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @return DescribeTasksResponse
 */
async function describeTasks(): DescribeTasksResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeTasksWithOptions(runtime);
}

model DownloadFabricOrganizationSDKRequest {
  location?: string(name='Location', example='cn-hangzhou'),
  organizationId?: string(name='OrganizationId', description='This parameter is required.', example='peers-aaaaaa2-1eqnj5o5w****'),
  username?: string(name='Username', description='This parameter is required.', example='username'),
}

model DownloadFabricOrganizationSDKResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: [ 
    {
      content?: string(name='Content', example='base64string'),
      path?: string(name='Path', example='dir/file'),
    }
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DownloadFabricOrganizationSDKResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DownloadFabricOrganizationSDKResponseBody(name='body'),
}

/**
 * @param request DownloadFabricOrganizationSDKRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DownloadFabricOrganizationSDKResponse
 */
async function downloadFabricOrganizationSDKWithOptions(request: DownloadFabricOrganizationSDKRequest, runtime: Util.RuntimeOptions): DownloadFabricOrganizationSDKResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.organizationId)) {
    query['OrganizationId'] = request.organizationId;
  }
  if (!Util.isUnset(request.username)) {
    query['Username'] = request.username;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DownloadFabricOrganizationSDK',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DownloadFabricOrganizationSDKRequest
 * @return DownloadFabricOrganizationSDKResponse
 */
async function downloadFabricOrganizationSDK(request: DownloadFabricOrganizationSDKRequest): DownloadFabricOrganizationSDKResponse {
  var runtime = new Util.RuntimeOptions{};
  return downloadFabricOrganizationSDKWithOptions(request, runtime);
}

model FreezeAntChainAccountRequest {
  account?: string(name='Account', description='This parameter is required.', example='accountname'),
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='1q8B5R9p'),
}

model FreezeAntChainAccountResponseBody = {
  requestId?: string(name='RequestId', example='9F862442-F6AD-4B5F-8969-CE23DE1413CB'),
  result?: string(name='Result', example='success'),
}

model FreezeAntChainAccountResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: FreezeAntChainAccountResponseBody(name='body'),
}

/**
 * @param request FreezeAntChainAccountRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return FreezeAntChainAccountResponse
 */
async function freezeAntChainAccountWithOptions(request: FreezeAntChainAccountRequest, runtime: Util.RuntimeOptions): FreezeAntChainAccountResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.account)) {
    body['Account'] = request.account;
  }
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'FreezeAntChainAccount',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request FreezeAntChainAccountRequest
 * @return FreezeAntChainAccountResponse
 */
async function freezeAntChainAccount(request: FreezeAntChainAccountRequest): FreezeAntChainAccountResponse {
  var runtime = new Util.RuntimeOptions{};
  return freezeAntChainAccountWithOptions(request, runtime);
}

model InstallFabricChaincodeRequest {
  chaincodeId?: string(name='ChaincodeId', description='This parameter is required.', example='chan-channelx-1l1hmckuuisxo'),
  location?: string(name='Location', example='cn-hangzhou'),
  organizationId?: string(name='OrganizationId', description='This parameter is required.', example='peers-aaaaaa2-1eqnj5o5w9dt3'),
}

model InstallFabricChaincodeResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: {
    chaincodeId?: string(name='ChaincodeId', example='cc-198jejf8f8chi8'),
    chaincodeName?: string(name='ChaincodeName', example='mychannel'),
    chaincodeVersion?: string(name='ChaincodeVersion', example='1.0'),
    channelName?: string(name='ChannelName', example='mychannel'),
    consortiumId?: string(name='ConsortiumId', example='consortium-lianmenyumingyi-hc5d1bwlulg7'),
    createTime?: string(name='CreateTime', example='1533025590'),
    deployTime?: string(name='DeployTime', example='1533025590'),
    endorsePolicy?: string(name='EndorsePolicy', example='OR ("perf9141MSP.member")'),
    input?: string(name='Input', example='input'),
    install?: boolean(name='Install', example='false'),
    message?: string(name='Message', example='ok'),
    path?: string(name='Path', example='github.com/hyperledger/fabric-samples/chaincode/sacc'),
    providerId?: string(name='ProviderId', example='providerid'),
    providerName?: string(name='ProviderName', example='prividername'),
    state?: string(name='State', example='Pending'),
    type?: int32(name='Type', example='1'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model InstallFabricChaincodeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InstallFabricChaincodeResponseBody(name='body'),
}

/**
 * @param request InstallFabricChaincodeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return InstallFabricChaincodeResponse
 */
async function installFabricChaincodeWithOptions(request: InstallFabricChaincodeRequest, runtime: Util.RuntimeOptions): InstallFabricChaincodeResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.chaincodeId)) {
    body['ChaincodeId'] = request.chaincodeId;
  }
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  if (!Util.isUnset(request.organizationId)) {
    body['OrganizationId'] = request.organizationId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'InstallFabricChaincode',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request InstallFabricChaincodeRequest
 * @return InstallFabricChaincodeResponse
 */
async function installFabricChaincode(request: InstallFabricChaincodeRequest): InstallFabricChaincodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return installFabricChaincodeWithOptions(request, runtime);
}

model InstallFabricChaincodePackageRequest {
  chaincodePackageId?: string(name='ChaincodePackageId', description='This parameter is required.', example='chan-channelx-1l1hmckuuisxo'),
  location?: string(name='Location', example='cn-hangzhou'),
  organizationId?: string(name='OrganizationId', description='This parameter is required.', example='peers-aaaaaa2-1eqnj5o5w9dt3'),
}

model InstallFabricChaincodePackageResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  message?: string(name='Message', example='ok'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: ChaincodePackage(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model InstallFabricChaincodePackageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InstallFabricChaincodePackageResponseBody(name='body'),
}

/**
 * @summary InstallFabricChaincodePackage
 *
 * @param request InstallFabricChaincodePackageRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return InstallFabricChaincodePackageResponse
 */
async function installFabricChaincodePackageWithOptions(request: InstallFabricChaincodePackageRequest, runtime: Util.RuntimeOptions): InstallFabricChaincodePackageResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.chaincodePackageId)) {
    body['ChaincodePackageId'] = request.chaincodePackageId;
  }
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  if (!Util.isUnset(request.organizationId)) {
    body['OrganizationId'] = request.organizationId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'InstallFabricChaincodePackage',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary InstallFabricChaincodePackage
 *
 * @param request InstallFabricChaincodePackageRequest
 * @return InstallFabricChaincodePackageResponse
 */
async function installFabricChaincodePackage(request: InstallFabricChaincodePackageRequest): InstallFabricChaincodePackageResponse {
  var runtime = new Util.RuntimeOptions{};
  return installFabricChaincodePackageWithOptions(request, runtime);
}

model InstantiateFabricChaincodeRequest {
  chaincodeId?: string(name='ChaincodeId', description='This parameter is required.', example='cc-198jejf8f8****'),
  collectionConfig?: string(name='CollectionConfig', example='[{"requiredPeerCount":0,"name":"collectionName","maxPeerCount":3,"blockToLive":0,"policy":"OR(\\\\"Org1MSP.peer\\\\")"}]'),
  endorsePolicy?: string(name='EndorsePolicy', example='OR (&#39;perf9141MSP.member&#39;)'),
  location?: string(name='Location', example='cn-hangzhou'),
  organizationId?: string(name='OrganizationId', description='This parameter is required.', example='peers-aaaaaa2-1eqnj5o5w****'),
}

model InstantiateFabricChaincodeResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: {
    chaincodeId?: string(name='ChaincodeId', example='cc-198jejf8f8chi8'),
    chaincodeName?: string(name='ChaincodeName', example='channelname'),
    chaincodeVersion?: string(name='ChaincodeVersion', example='1.0'),
    channelName?: string(name='ChannelName', example='channelname'),
    consortiumId?: string(name='ConsortiumId', example='consortium-lianmenyumingyi-hc5d1bwlulg7'),
    createTime?: string(name='CreateTime', example='1533025590'),
    deployTime?: string(name='DeployTime', example='1533025590'),
    endorsePolicy?: string(name='EndorsePolicy', example='OR (\\\\"aaaaaa1MSP.peer\\\\")'),
    input?: string(name='Input', example='input'),
    install?: boolean(name='Install', example='false'),
    message?: string(name='Message', example='ok'),
    path?: string(name='Path', example='go-sdk-demo/chaincode/src'),
    providerId?: string(name='ProviderId', example='id'),
    providerName?: string(name='ProviderName', example='name'),
    state?: string(name='State', example='Running'),
    type?: int32(name='Type', example='1'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model InstantiateFabricChaincodeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InstantiateFabricChaincodeResponseBody(name='body'),
}

/**
 * @param request InstantiateFabricChaincodeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return InstantiateFabricChaincodeResponse
 */
async function instantiateFabricChaincodeWithOptions(request: InstantiateFabricChaincodeRequest, runtime: Util.RuntimeOptions): InstantiateFabricChaincodeResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.chaincodeId)) {
    body['ChaincodeId'] = request.chaincodeId;
  }
  if (!Util.isUnset(request.collectionConfig)) {
    body['CollectionConfig'] = request.collectionConfig;
  }
  if (!Util.isUnset(request.endorsePolicy)) {
    body['EndorsePolicy'] = request.endorsePolicy;
  }
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  if (!Util.isUnset(request.organizationId)) {
    body['OrganizationId'] = request.organizationId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'InstantiateFabricChaincode',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request InstantiateFabricChaincodeRequest
 * @return InstantiateFabricChaincodeResponse
 */
async function instantiateFabricChaincode(request: InstantiateFabricChaincodeRequest): InstantiateFabricChaincodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return instantiateFabricChaincodeWithOptions(request, runtime);
}

model JoinFabricChannelRequest {
  channelId?: string(name='ChannelId', description='This parameter is required.', example='chan-channelx-1l1hmckuu****'),
  do?: string(name='Do', description='This parameter is required.', example='accept'),
  location?: string(name='Location', example='cn-hangzhou'),
}

model JoinFabricChannelResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: [ 
    {
      acceptTime?: string(name='AcceptTime', example='1533025590'),
      approveTime?: string(name='ApproveTime', example='1533025590'),
      channelId?: string(name='ChannelId', example='channelid'),
      confirmTime?: string(name='ConfirmTime', example='1533025590'),
      destroyTime?: string(name='DestroyTime', example='1533025590'),
      inviteTime?: string(name='InviteTime', example='1533025590'),
      organizationId?: string(name='OrganizationId', example='peers-aaaaaa2-1eqnj5o5w9dt3'),
      state?: string(name='State', example='Running'),
      withPeer?: boolean(name='WithPeer', example='true'),
    }
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model JoinFabricChannelResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: JoinFabricChannelResponseBody(name='body'),
}

/**
 * @param request JoinFabricChannelRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return JoinFabricChannelResponse
 */
async function joinFabricChannelWithOptions(request: JoinFabricChannelRequest, runtime: Util.RuntimeOptions): JoinFabricChannelResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!Util.isUnset(request.do)) {
    query['Do'] = request.do;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'JoinFabricChannel',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request JoinFabricChannelRequest
 * @return JoinFabricChannelResponse
 */
async function joinFabricChannel(request: JoinFabricChannelRequest): JoinFabricChannelResponse {
  var runtime = new Util.RuntimeOptions{};
  return joinFabricChannelWithOptions(request, runtime);
}

model ListTagResourcesRequest {
  nextToken?: string(name='NextToken', example='MWJlMTY4ZmY4MzdmMDQzYmRlMTdjMDMxNDM0MWM4NDI3MTA0N2IzMQo='),
  resourceId?: [ string ](name='ResourceId', example='peers-tf000eihjli000shanghai-yqxvj52lruxx'),
  resourceType?: string(name='ResourceType', description='This parameter is required.', example='organization'),
  tag?: [ 
    {
      key?: string(name='Key', example='key1'),
      value?: string(name='Value', example='value2'),
    }
  ](name='Tag'),
}

model ListTagResourcesResponseBody = {
  nextToken?: string(name='NextToken', example='MWJlMTY4ZmY4MzdmMDQzYmRlMTdjMDMxNDM0MWM4NDI3MTA0N2IzMQo='),
  requestId?: string(name='RequestId', example='21B8738D-254C-4933-9FC1-3C31B2611482'),
  tagResources?: [ 
    {
      resourceId?: string(name='ResourceId', example='peers-tf000eihjli000shanghai-yqxvj52lruxx'),
      resourceType?: string(name='ResourceType', example='organization'),
      tagKey?: string(name='TagKey', example='key1'),
      tagValue?: string(name='TagValue', example='value1'),
    }
  ](name='TagResources'),
}

model ListTagResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListTagResourcesResponseBody(name='body'),
}

/**
 * @param request ListTagResourcesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListTagResourcesResponse
 */
async function listTagResourcesWithOptions(request: ListTagResourcesRequest, runtime: Util.RuntimeOptions): ListTagResourcesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListTagResources',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ListTagResourcesRequest
 * @return ListTagResourcesResponse
 */
async function listTagResources(request: ListTagResourcesRequest): ListTagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listTagResourcesWithOptions(request, runtime);
}

model ResetAntChainCertificateRequest {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='pYogqb9v'),
}

model ResetAntChainCertificateResponseBody = {
  requestId?: string(name='RequestId', example='6ED983D3-C131-4104-8BDD-1F37992258E1'),
  result?: string(name='Result', example='success'),
}

model ResetAntChainCertificateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ResetAntChainCertificateResponseBody(name='body'),
}

/**
 * @param request ResetAntChainCertificateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ResetAntChainCertificateResponse
 */
async function resetAntChainCertificateWithOptions(request: ResetAntChainCertificateRequest, runtime: Util.RuntimeOptions): ResetAntChainCertificateResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ResetAntChainCertificate',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ResetAntChainCertificateRequest
 * @return ResetAntChainCertificateResponse
 */
async function resetAntChainCertificate(request: ResetAntChainCertificateRequest): ResetAntChainCertificateResponse {
  var runtime = new Util.RuntimeOptions{};
  return resetAntChainCertificateWithOptions(request, runtime);
}

model ResetAntChainUserCertificateRequest {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='bDXK6boZ'),
  username?: string(name='Username', description='This parameter is required.', example='uid-128712635330****'),
}

model ResetAntChainUserCertificateResponseBody = {
  requestId?: string(name='RequestId', example='3EB828D1-1E9D-4EC2-A002-139FE998D674'),
  result?: string(name='Result', example='success'),
}

model ResetAntChainUserCertificateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ResetAntChainUserCertificateResponseBody(name='body'),
}

/**
 * @param request ResetAntChainUserCertificateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ResetAntChainUserCertificateResponse
 */
async function resetAntChainUserCertificateWithOptions(request: ResetAntChainUserCertificateRequest, runtime: Util.RuntimeOptions): ResetAntChainUserCertificateResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.username)) {
    body['Username'] = request.username;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ResetAntChainUserCertificate',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ResetAntChainUserCertificateRequest
 * @return ResetAntChainUserCertificateResponse
 */
async function resetAntChainUserCertificate(request: ResetAntChainUserCertificateRequest): ResetAntChainUserCertificateResponse {
  var runtime = new Util.RuntimeOptions{};
  return resetAntChainUserCertificateWithOptions(request, runtime);
}

model ResetFabricOrganizationUserPasswordRequest {
  location?: string(name='Location', example='cn-hangzhou'),
  organizationId?: string(name='OrganizationId', description='This parameter is required.', example='peers-aaaaaa2-1eqnj5o5w****'),
  password?: string(name='Password', description='This parameter is required.', example='pwd'),
  username?: string(name='Username', description='This parameter is required.', example='username'),
}

model ResetFabricOrganizationUserPasswordResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: {
    createTime?: string(name='CreateTime', example='1533025590'),
    expireTime?: string(name='ExpireTime', example='1533025590'),
    fullname?: string(name='Fullname', example='username'),
    organizationId?: string(name='OrganizationId', example='peers-aaaaaa2-1eqnj5o5w****'),
    password?: string(name='Password', example='password'),
    username?: string(name='Username', example='username'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model ResetFabricOrganizationUserPasswordResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ResetFabricOrganizationUserPasswordResponseBody(name='body'),
}

/**
 * @param request ResetFabricOrganizationUserPasswordRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ResetFabricOrganizationUserPasswordResponse
 */
async function resetFabricOrganizationUserPasswordWithOptions(request: ResetFabricOrganizationUserPasswordRequest, runtime: Util.RuntimeOptions): ResetFabricOrganizationUserPasswordResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  if (!Util.isUnset(request.organizationId)) {
    body['OrganizationId'] = request.organizationId;
  }
  if (!Util.isUnset(request.password)) {
    body['Password'] = request.password;
  }
  if (!Util.isUnset(request.username)) {
    body['Username'] = request.username;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ResetFabricOrganizationUserPassword',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ResetFabricOrganizationUserPasswordRequest
 * @return ResetFabricOrganizationUserPasswordResponse
 */
async function resetFabricOrganizationUserPassword(request: ResetFabricOrganizationUserPasswordRequest): ResetFabricOrganizationUserPasswordResponse {
  var runtime = new Util.RuntimeOptions{};
  return resetFabricOrganizationUserPasswordWithOptions(request, runtime);
}

model SubmitFabricChaincodeDefinitionRequest {
  chaincodePackageId?: string(name='ChaincodePackageId', description='This parameter is required.', example='sacc_v1.0:698d4e73c5f1d0239fbf0313ac79ddfaf44d5a803ecb02a4d1983cca4a706860'),
  chaincodeVersion?: string(name='ChaincodeVersion', description='This parameter is required.', example='1.0'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='chan-channelx-1l1hmckuuisxo'),
  collectionConfig?: string(name='CollectionConfig', example='collectionconfig'),
  endorsePolicy?: string(name='EndorsePolicy', description='This parameter is required.', example='OR ("perf9141MSP.member")'),
  initRequired?: boolean(name='InitRequired', example='false'),
  location?: string(name='Location', example='cn-hangzhou'),
  name?: string(name='Name', description='This parameter is required.', example='sacc'),
  organizationId?: string(name='OrganizationId', description='This parameter is required.', example='peers-aaaaaa2-1eqnj5o5w9dt3'),
}

model SubmitFabricChaincodeDefinitionResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: ChaincodeVO(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model SubmitFabricChaincodeDefinitionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SubmitFabricChaincodeDefinitionResponseBody(name='body'),
}

/**
 * @summary SubmitFabricChaincodeDefinition
 *
 * @param request SubmitFabricChaincodeDefinitionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SubmitFabricChaincodeDefinitionResponse
 */
async function submitFabricChaincodeDefinitionWithOptions(request: SubmitFabricChaincodeDefinitionRequest, runtime: Util.RuntimeOptions): SubmitFabricChaincodeDefinitionResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.chaincodePackageId)) {
    body['ChaincodePackageId'] = request.chaincodePackageId;
  }
  if (!Util.isUnset(request.chaincodeVersion)) {
    body['ChaincodeVersion'] = request.chaincodeVersion;
  }
  if (!Util.isUnset(request.channelId)) {
    body['ChannelId'] = request.channelId;
  }
  if (!Util.isUnset(request.collectionConfig)) {
    body['CollectionConfig'] = request.collectionConfig;
  }
  if (!Util.isUnset(request.endorsePolicy)) {
    body['EndorsePolicy'] = request.endorsePolicy;
  }
  if (!Util.isUnset(request.initRequired)) {
    body['InitRequired'] = request.initRequired;
  }
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  if (!Util.isUnset(request.name)) {
    body['Name'] = request.name;
  }
  if (!Util.isUnset(request.organizationId)) {
    body['OrganizationId'] = request.organizationId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SubmitFabricChaincodeDefinition',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary SubmitFabricChaincodeDefinition
 *
 * @param request SubmitFabricChaincodeDefinitionRequest
 * @return SubmitFabricChaincodeDefinitionResponse
 */
async function submitFabricChaincodeDefinition(request: SubmitFabricChaincodeDefinitionRequest): SubmitFabricChaincodeDefinitionResponse {
  var runtime = new Util.RuntimeOptions{};
  return submitFabricChaincodeDefinitionWithOptions(request, runtime);
}

model SynchronizeFabricChaincodeRequest {
  chaincodeId?: string(name='ChaincodeId', description='This parameter is required.', example='code-sacc-1pr09q7jm****'),
  organizationId?: string(name='OrganizationId', description='This parameter is required.', example='peers-aaaaaa2-1eqnj5o5w****'),
}

model SynchronizeFabricChaincodeResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3'),
  result?: {
    chaincodeId?: string(name='ChaincodeId', example='code-sacc-1pr09q7jm****'),
    chaincodeName?: string(name='ChaincodeName', example='mychaincode'),
    chaincodeVersion?: string(name='ChaincodeVersion', example='1.0'),
    channelName?: string(name='ChannelName', example='chan-channelx-1l1hmckuuisxo'),
    consortiumId?: string(name='ConsortiumId', example='consortium-lianmenyumingyi-hc5d1bwl****'),
    createTime?: string(name='CreateTime', example='1533025590'),
    deployTime?: string(name='DeployTime', example='1533025590'),
    endorsePolicy?: string(name='EndorsePolicy', example='OR (\\\\"aaaaaa1MSP.peer\\\\")'),
    input?: string(name='Input', example='input'),
    install?: boolean(name='Install', example='false'),
    message?: string(name='Message', example='ok'),
    path?: string(name='Path', example='go-sdk-demo/chaincode/src'),
    providerId?: string(name='ProviderId', example='provider'),
    providerName?: string(name='ProviderName', example='name'),
    state?: string(name='State', example='Running'),
    type?: int32(name='Type', example='1'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model SynchronizeFabricChaincodeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SynchronizeFabricChaincodeResponseBody(name='body'),
}

/**
 * @param request SynchronizeFabricChaincodeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SynchronizeFabricChaincodeResponse
 */
async function synchronizeFabricChaincodeWithOptions(request: SynchronizeFabricChaincodeRequest, runtime: Util.RuntimeOptions): SynchronizeFabricChaincodeResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.chaincodeId)) {
    body['ChaincodeId'] = request.chaincodeId;
  }
  if (!Util.isUnset(request.organizationId)) {
    body['OrganizationId'] = request.organizationId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SynchronizeFabricChaincode',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request SynchronizeFabricChaincodeRequest
 * @return SynchronizeFabricChaincodeResponse
 */
async function synchronizeFabricChaincode(request: SynchronizeFabricChaincodeRequest): SynchronizeFabricChaincodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return synchronizeFabricChaincodeWithOptions(request, runtime);
}

model TagResourcesRequest {
  resourceId?: [ string ](name='ResourceId', example='peers-tf000eihjli000beijing-bl6rdwi82tget'),
  resourceType?: string(name='ResourceType', description='This parameter is required.', example='organization'),
  tag?: [ 
    {
      key?: string(name='Key', example='key1'),
      value?: string(name='Value', example='value1'),
    }
  ](name='Tag'),
}

model TagResourcesResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='21B8738D-254C-4933-9FC1-3C31B2611482'),
  result?: boolean(name='Result', example='true'),
  success?: boolean(name='Success', example='true'),
}

model TagResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: TagResourcesResponseBody(name='body'),
}

/**
 * @param request TagResourcesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return TagResourcesResponse
 */
async function tagResourcesWithOptions(request: TagResourcesRequest, runtime: Util.RuntimeOptions): TagResourcesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'TagResources',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request TagResourcesRequest
 * @return TagResourcesResponse
 */
async function tagResources(request: TagResourcesRequest): TagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return tagResourcesWithOptions(request, runtime);
}

model UnfreezeAntChainAccountRequest {
  account?: string(name='Account', description='This parameter is required.', example='accountname'),
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='1q8B5R9p'),
}

model UnfreezeAntChainAccountResponseBody = {
  requestId?: string(name='RequestId', example='6ED983D3-C131-4104-8BDD-1F37992258E1'),
  result?: string(name='Result', example='success'),
}

model UnfreezeAntChainAccountResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UnfreezeAntChainAccountResponseBody(name='body'),
}

/**
 * @param request UnfreezeAntChainAccountRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UnfreezeAntChainAccountResponse
 */
async function unfreezeAntChainAccountWithOptions(request: UnfreezeAntChainAccountRequest, runtime: Util.RuntimeOptions): UnfreezeAntChainAccountResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.account)) {
    body['Account'] = request.account;
  }
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UnfreezeAntChainAccount',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request UnfreezeAntChainAccountRequest
 * @return UnfreezeAntChainAccountResponse
 */
async function unfreezeAntChainAccount(request: UnfreezeAntChainAccountRequest): UnfreezeAntChainAccountResponse {
  var runtime = new Util.RuntimeOptions{};
  return unfreezeAntChainAccountWithOptions(request, runtime);
}

model UntagResourcesRequest {
  all?: boolean(name='All', example='true'),
  resourceId?: [ string ](name='ResourceId', example='peers-tf000eihjli000shanghai-yqxvj52lruxx'),
  resourceType?: string(name='ResourceType', description='This parameter is required.', example='organization'),
  tagKey?: [ string ](name='TagKey', example='key1'),
}

model UntagResourcesResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='21B8738D-254C-4933-9FC1-3C31B2611482'),
  result?: boolean(name='Result', example='true'),
  success?: boolean(name='Success', example='true'),
}

model UntagResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UntagResourcesResponseBody(name='body'),
}

/**
 * @param request UntagResourcesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UntagResourcesResponse
 */
async function untagResourcesWithOptions(request: UntagResourcesRequest, runtime: Util.RuntimeOptions): UntagResourcesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.all)) {
    query['All'] = request.all;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.tagKey)) {
    query['TagKey'] = request.tagKey;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UntagResources',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request UntagResourcesRequest
 * @return UntagResourcesResponse
 */
async function untagResources(request: UntagResourcesRequest): UntagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return untagResourcesWithOptions(request, runtime);
}

model UpdateAntChainRequest {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='pYogqb9v'),
  antChainName?: string(name='AntChainName', description='This parameter is required.'),
}

model UpdateAntChainResponseBody = {
  requestId?: string(name='RequestId', example='F6A52E53-2CCB-4C3C-A44D-45FAEBC24E47'),
  result?: string(name='Result', example='success'),
}

model UpdateAntChainResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateAntChainResponseBody(name='body'),
}

/**
 * @param request UpdateAntChainRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateAntChainResponse
 */
async function updateAntChainWithOptions(request: UpdateAntChainRequest, runtime: Util.RuntimeOptions): UpdateAntChainResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.antChainName)) {
    body['AntChainName'] = request.antChainName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateAntChain',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request UpdateAntChainRequest
 * @return UpdateAntChainResponse
 */
async function updateAntChain(request: UpdateAntChainRequest): UpdateAntChainResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateAntChainWithOptions(request, runtime);
}

model UpdateAntChainConsortiumRequest {
  consortiumDescription?: string(name='ConsortiumDescription'),
  consortiumId?: string(name='ConsortiumId', description='This parameter is required.', example='q0oWq92P'),
  consortiumName?: string(name='ConsortiumName', description='This parameter is required.'),
}

model UpdateAntChainConsortiumResponseBody = {
  requestId?: string(name='RequestId', example='1E55C947-19B4-4AAD-9D22-0B8DA8904B3D'),
  result?: string(name='Result', example='success'),
}

model UpdateAntChainConsortiumResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateAntChainConsortiumResponseBody(name='body'),
}

/**
 * @param request UpdateAntChainConsortiumRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateAntChainConsortiumResponse
 */
async function updateAntChainConsortiumWithOptions(request: UpdateAntChainConsortiumRequest, runtime: Util.RuntimeOptions): UpdateAntChainConsortiumResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.consortiumDescription)) {
    body['ConsortiumDescription'] = request.consortiumDescription;
  }
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  if (!Util.isUnset(request.consortiumName)) {
    body['ConsortiumName'] = request.consortiumName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateAntChainConsortium',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request UpdateAntChainConsortiumRequest
 * @return UpdateAntChainConsortiumResponse
 */
async function updateAntChainConsortium(request: UpdateAntChainConsortiumRequest): UpdateAntChainConsortiumResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateAntChainConsortiumWithOptions(request, runtime);
}

model UpdateAntChainContractContentRequest {
  content?: string(name='Content', example='update content'),
  contentId?: string(name='ContentId', description='This parameter is required.', example='R6XMn59e'),
  contentName?: string(name='ContentName', example='newFile'),
  parentContentId?: string(name='ParentContentId', example='R38DYDop'),
}

model UpdateAntChainContractContentResponseBody = {
  requestId?: string(name='RequestId', example='08CBD579-C430-4F1F-9011-C120FA1E9B97'),
  result?: string(name='Result', example='success'),
}

model UpdateAntChainContractContentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateAntChainContractContentResponseBody(name='body'),
}

/**
 * @param request UpdateAntChainContractContentRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateAntChainContractContentResponse
 */
async function updateAntChainContractContentWithOptions(request: UpdateAntChainContractContentRequest, runtime: Util.RuntimeOptions): UpdateAntChainContractContentResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.content)) {
    body['Content'] = request.content;
  }
  if (!Util.isUnset(request.contentId)) {
    body['ContentId'] = request.contentId;
  }
  if (!Util.isUnset(request.contentName)) {
    body['ContentName'] = request.contentName;
  }
  if (!Util.isUnset(request.parentContentId)) {
    body['ParentContentId'] = request.parentContentId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateAntChainContractContent',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request UpdateAntChainContractContentRequest
 * @return UpdateAntChainContractContentResponse
 */
async function updateAntChainContractContent(request: UpdateAntChainContractContentRequest): UpdateAntChainContractContentResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateAntChainContractContentWithOptions(request, runtime);
}

model UpdateAntChainContractProjectRequest {
  projectDescription?: string(name='ProjectDescription'),
  projectId?: string(name='ProjectId', description='This parameter is required.', example='bDXK1b8Z'),
  projectName?: string(name='ProjectName'),
  projectVersion?: string(name='ProjectVersion', example='v1.1.1'),
}

model UpdateAntChainContractProjectResponseBody = {
  requestId?: string(name='RequestId', example='9EBD381E-A19E-4875-8771-EDA08A0416D3'),
  result?: string(name='Result', example='success'),
}

model UpdateAntChainContractProjectResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateAntChainContractProjectResponseBody(name='body'),
}

/**
 * @param request UpdateAntChainContractProjectRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateAntChainContractProjectResponse
 */
async function updateAntChainContractProjectWithOptions(request: UpdateAntChainContractProjectRequest, runtime: Util.RuntimeOptions): UpdateAntChainContractProjectResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.projectDescription)) {
    body['ProjectDescription'] = request.projectDescription;
  }
  if (!Util.isUnset(request.projectId)) {
    body['ProjectId'] = request.projectId;
  }
  if (!Util.isUnset(request.projectName)) {
    body['ProjectName'] = request.projectName;
  }
  if (!Util.isUnset(request.projectVersion)) {
    body['ProjectVersion'] = request.projectVersion;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateAntChainContractProject',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request UpdateAntChainContractProjectRequest
 * @return UpdateAntChainContractProjectResponse
 */
async function updateAntChainContractProject(request: UpdateAntChainContractProjectRequest): UpdateAntChainContractProjectResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateAntChainContractProjectWithOptions(request, runtime);
}

model UpdateAntChainMemberRequest {
  consortiumId?: string(name='ConsortiumId', description='This parameter is required.', example='AroN3X2l'),
  memberId?: string(name='MemberId', description='This parameter is required.', example='1287126353301234'),
  memberName?: string(name='MemberName', description='This parameter is required.', example='updatename'),
}

model UpdateAntChainMemberResponseBody = {
  requestId?: string(name='RequestId', example='5BA242B2-AB0C-4D06-94EB-23CEC4F7B95E'),
  result?: string(name='Result', example='success'),
}

model UpdateAntChainMemberResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateAntChainMemberResponseBody(name='body'),
}

/**
 * @param request UpdateAntChainMemberRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateAntChainMemberResponse
 */
async function updateAntChainMemberWithOptions(request: UpdateAntChainMemberRequest, runtime: Util.RuntimeOptions): UpdateAntChainMemberResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.consortiumId)) {
    body['ConsortiumId'] = request.consortiumId;
  }
  if (!Util.isUnset(request.memberId)) {
    body['MemberId'] = request.memberId;
  }
  if (!Util.isUnset(request.memberName)) {
    body['MemberName'] = request.memberName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateAntChainMember',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request UpdateAntChainMemberRequest
 * @return UpdateAntChainMemberResponse
 */
async function updateAntChainMember(request: UpdateAntChainMemberRequest): UpdateAntChainMemberResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateAntChainMemberWithOptions(request, runtime);
}

model UpdateAntChainQRCodeAuthorizationRequest {
  antChainId?: string(name='AntChainId', description='This parameter is required.', example='bDXK6boZ'),
  authorizationType?: string(name='AuthorizationType', description='This parameter is required.', example='ALL_USER_AUTHORIZATION'),
  QRCodeType?: string(name='QRCodeType', description='This parameter is required.', example='MINI_APP_BROWSER_TRANSACTION'),
}

model UpdateAntChainQRCodeAuthorizationResponseBody = {
  requestId?: string(name='RequestId', example='D68D66B6-1964-4073-8714-B49F5EF1AEFC'),
  result?: string(name='Result', example='success'),
}

model UpdateAntChainQRCodeAuthorizationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateAntChainQRCodeAuthorizationResponseBody(name='body'),
}

/**
 * @param request UpdateAntChainQRCodeAuthorizationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateAntChainQRCodeAuthorizationResponse
 */
async function updateAntChainQRCodeAuthorizationWithOptions(request: UpdateAntChainQRCodeAuthorizationRequest, runtime: Util.RuntimeOptions): UpdateAntChainQRCodeAuthorizationResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.antChainId)) {
    body['AntChainId'] = request.antChainId;
  }
  if (!Util.isUnset(request.authorizationType)) {
    body['AuthorizationType'] = request.authorizationType;
  }
  if (!Util.isUnset(request.QRCodeType)) {
    body['QRCodeType'] = request.QRCodeType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateAntChainQRCodeAuthorization',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request UpdateAntChainQRCodeAuthorizationRequest
 * @return UpdateAntChainQRCodeAuthorizationResponse
 */
async function updateAntChainQRCodeAuthorization(request: UpdateAntChainQRCodeAuthorizationRequest): UpdateAntChainQRCodeAuthorizationResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateAntChainQRCodeAuthorizationWithOptions(request, runtime);
}

model UpgradeFabricChaincodeRequest {
  chaincodeId?: string(name='ChaincodeId', description='This parameter is required.', example='code-sacc-fk9z4r97****'),
  collectionConfig?: string(name='CollectionConfig', example='[{"requiredPeerCount":0,"name":"collectionName","maxPeerCount":3,"blockToLive":0,"policy":"OR(\\\\"Org1MSP.peer\\\\")"}]'),
  endorsePolicy?: string(name='EndorsePolicy', example='OR ("wholesalerMSP.peer")'),
  location?: string(name='Location', example='cn-hangzhou'),
  organizationId?: string(name='OrganizationId', description='This parameter is required.', example='peers-wholesaler-15ix77tof****'),
}

model UpgradeFabricChaincodeResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  requestId?: string(name='RequestId', example='A6CC6C63-2D71-4D0C-AEBE-E95F0127C514'),
  result?: {
    chaincodeId?: string(name='ChaincodeId', example='code-sacc-fk9z4r97****'),
    chaincodeName?: string(name='ChaincodeName', example='mychaincode'),
    chaincodeVersion?: string(name='ChaincodeVersion', example='1.0'),
    channelName?: string(name='ChannelName', example='cc'),
    consortiumId?: string(name='ConsortiumId', example='consortium-supplychain-1pxzsp5tb****'),
    createTime?: string(name='CreateTime', example='1545215617000'),
    deployTime?: string(name='DeployTime', example='1545215617000'),
    endorsePolicy?: string(name='EndorsePolicy', example='OR ("wholesalerMSP.peer")'),
    input?: string(name='Input', example='input'),
    install?: boolean(name='Install', example='false'),
    message?: string(name='Message', example='OK'),
    path?: string(name='Path', example='github.com/sacc'),
    providerId?: string(name='ProviderId', example='1928592'),
    providerName?: string(name='ProviderName', example='uid-1928592'),
    state?: string(name='State', example='Running'),
    type?: int32(name='Type', example='1'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model UpgradeFabricChaincodeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpgradeFabricChaincodeResponseBody(name='body'),
}

/**
 * @description ****
 *
 * @param request UpgradeFabricChaincodeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpgradeFabricChaincodeResponse
 */
async function upgradeFabricChaincodeWithOptions(request: UpgradeFabricChaincodeRequest, runtime: Util.RuntimeOptions): UpgradeFabricChaincodeResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.chaincodeId)) {
    body['ChaincodeId'] = request.chaincodeId;
  }
  if (!Util.isUnset(request.collectionConfig)) {
    body['CollectionConfig'] = request.collectionConfig;
  }
  if (!Util.isUnset(request.endorsePolicy)) {
    body['EndorsePolicy'] = request.endorsePolicy;
  }
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  if (!Util.isUnset(request.organizationId)) {
    body['OrganizationId'] = request.organizationId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpgradeFabricChaincode',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @description ****
 *
 * @param request UpgradeFabricChaincodeRequest
 * @return UpgradeFabricChaincodeResponse
 */
async function upgradeFabricChaincode(request: UpgradeFabricChaincodeRequest): UpgradeFabricChaincodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return upgradeFabricChaincodeWithOptions(request, runtime);
}

model UpgradeFabricChaincodeDefinitionRequest {
  chaincodeId?: string(name='ChaincodeId', description='This parameter is required.', example='code-sacc-jbkuldd3i7ad'),
  chaincodePackageId?: string(name='ChaincodePackageId', description='This parameter is required.', example='sacc_v1.0:698d4e73c5f1d0239fbf0313ac79ddfaf44d5a803ecb02a4d1983cca4a706860'),
  chaincodeVersion?: string(name='ChaincodeVersion', description='This parameter is required.', example='1.1'),
  collectionConfig?: string(name='CollectionConfig', example='collectionconfig'),
  endorsePolicy?: string(name='EndorsePolicy', description='This parameter is required.', example='OR ("perf9141MSP.member")'),
  initRequired?: boolean(name='InitRequired', example='true'),
  location?: string(name='Location', example='cn-hangzhou'),
  organizationId?: string(name='OrganizationId', description='This parameter is required.', example='peers-aaaaaa2-1eqnj5o5w9dt3'),
}

model UpgradeFabricChaincodeDefinitionResponseBody = {
  errorCode?: int32(name='ErrorCode', example='200'),
  message?: string(name='Message', example='ok'),
  requestId?: string(name='RequestId', example='1E55C947-19B4-4AAD-9D22-0B8DA8904B3D'),
  result?: ChaincodeVO(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model UpgradeFabricChaincodeDefinitionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpgradeFabricChaincodeDefinitionResponseBody(name='body'),
}

/**
 * @summary UpgradeFabricChaincodeDefinition
 *
 * @param request UpgradeFabricChaincodeDefinitionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpgradeFabricChaincodeDefinitionResponse
 */
async function upgradeFabricChaincodeDefinitionWithOptions(request: UpgradeFabricChaincodeDefinitionRequest, runtime: Util.RuntimeOptions): UpgradeFabricChaincodeDefinitionResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.chaincodeId)) {
    body['ChaincodeId'] = request.chaincodeId;
  }
  if (!Util.isUnset(request.chaincodePackageId)) {
    body['ChaincodePackageId'] = request.chaincodePackageId;
  }
  if (!Util.isUnset(request.chaincodeVersion)) {
    body['ChaincodeVersion'] = request.chaincodeVersion;
  }
  if (!Util.isUnset(request.collectionConfig)) {
    body['CollectionConfig'] = request.collectionConfig;
  }
  if (!Util.isUnset(request.endorsePolicy)) {
    body['EndorsePolicy'] = request.endorsePolicy;
  }
  if (!Util.isUnset(request.initRequired)) {
    body['InitRequired'] = request.initRequired;
  }
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  if (!Util.isUnset(request.organizationId)) {
    body['OrganizationId'] = request.organizationId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpgradeFabricChaincodeDefinition',
    version = '2018-12-21',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary UpgradeFabricChaincodeDefinition
 *
 * @param request UpgradeFabricChaincodeDefinitionRequest
 * @return UpgradeFabricChaincodeDefinitionResponse
 */
async function upgradeFabricChaincodeDefinition(request: UpgradeFabricChaincodeDefinitionRequest): UpgradeFabricChaincodeDefinitionResponse {
  var runtime = new Util.RuntimeOptions{};
  return upgradeFabricChaincodeDefinitionWithOptions(request, runtime);
}

